Skip to content

Conversation

@Big-Iron-Cheems
Copy link
Collaborator

Type of change

  • Bug fix
  • New feature

Description

Adds a command to calculate the optimal enchant order of an item given a list of enchant-level pairs.
Roughly based on https://github.com/iamcal/enchant-order for the calculation logic.
I think it works, but can be improved for sure :)

Related issues

None.

How Has This Been Tested?

Very rough testing, need more eyes on this.

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

I think it works, but can be improved for sure :)
NOTE: there is still a discrepancy in the calculation we make, need to figure out why.
@Big-Iron-Cheems
Copy link
Collaborator Author

The command I am using to test this is:

.eopt minecraft:netherite_helmet minecraft:aqua_affinity 1 minecraft:mending 1 minecraft:protection 4 minecraft:respiration 3 minecraft:thorns 3 minecraft:unbreaking 3 minecraft:binding_curse 1 minecraft:vanishing_curse 1

At the moment there seems to be a discrepancy between my algorithm and the website one.

Work is needed to find out why, relevant sources for the site impl are:

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