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

Fix crash due to empty array #6036

Closed
wants to merge 1 commit into from
Closed

Fix crash due to empty array #6036

wants to merge 1 commit into from

Conversation

AmmoniumX
Copy link

@AmmoniumX AmmoniumX commented Aug 12, 2024

This patch fixes #5290 , where the game will crash due to empty array passed to getPreferredStackbyMod.

The change is really simple, just by throwing an exception earlier in the chain, minecraft's server init logic is able to catch it and keep running. I'm not really 100% sure of the reason why, I just know that it works

This fix is particularly important for the pack I have recently released, Forever Factory, since it will always crash on world creation with the "Skyblock" preset, where with this patch, it never crashes.

Steps to verify the PR fix:

  1. Download Forever Factory
  2. Create new world, select "Skyblock" on world type
  3. Observe the crash
  4. Replace the IE jar with one compiled with this PR
  5. Create new world again
  6. World generates without crashing client

I am not sure if 1.19.2 is still supported, but I hope an exception can be made to fix this critical issue that strongly affects my modpack.

I am also open to further change requests if this PR is not satisfactory.

Have a nice day :)

@AmmoniumX AmmoniumX closed this by deleting the head repository Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant