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 crashes related to high level enchantments. #38

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

AbdielKavash
Copy link
Member

@AbdielKavash AbdielKavash commented Apr 12, 2024

Similar issues to GTNewHorizons/Thaumic_Exploration#35:

  • Final Strike enchant:
    Before, level 19 or higher would cause IllegalArgumentException by passing a zero or negative number to Random.nextInt().
    Now, level 19 and higher guarantees success.

  • Quickdraw enchant:
    Before, level 6 would cause a division by zero, level 7 or more would get progressively worse than level 5. (This is due to use of the modulo function.)
    Now, draw speed continues to increase beyond level 6 in a similar manner as before. Note that the logic was slightly reworked, but for levels 1-5 the draw speed increase is equivalent to before. (That is, every 6 - level ticks, draw time is reduced by one tick.)

Copy link
Member

@Alastors Alastors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine

@Dream-Master Dream-Master merged commit 180509a into GTNewHorizons:master Apr 12, 2024
1 check passed
DrParadox7 pushed a commit to DrParadox7/ThaumicTinkerer that referenced this pull request Jun 12, 2024
* Fix crashes with high level enchantments.

* bs+d
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.

3 participants