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

improperly annotated fields causing crashes #151

Closed
Linguardium opened this issue Dec 2, 2023 · 0 comments
Closed

improperly annotated fields causing crashes #151

Linguardium opened this issue Dec 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Linguardium
Copy link

Summary

https://github.com/SamB440/Tale-of-Kingdoms/blob/02107a1d0f8cc48c0f7532da1d211464e4cd6af7/src/main/java/com/convallyria/taleofkingdoms/TaleOfKingdomsAPI.java#L32C1-L35C105

fabric finally fixed the bug that caused annotated fields to be included on both sides. this unfortunately means that the assignment here will fail on non-dedicated servers. the field doesnt exist on clients, so the assignment fails to find the field. the declare and assign being on the same line is just sugar and actually occur at different times at the bytecode level.

Steps to reproduce

launch client game on loader 0.15 (or dedicated server on 0.15)

Expected behaviour

no crash

Mod list

N/A

Possible fixes

I would suggest you fix this using a parent class of the API and then use inheritence to assign the correct type via a dedicated server and client entrypoint rather than trying to jam them together. It would also make the classes more readable

Relevent logs and/or screenshots/videos

No response

Other

No response

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