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

Support enchants (and nbt) #35

Open
2 tasks
u9g opened this issue Apr 10, 2021 · 7 comments
Open
2 tasks

Support enchants (and nbt) #35

u9g opened this issue Apr 10, 2021 · 7 comments

Comments

@u9g
Copy link
Member

u9g commented Apr 10, 2021

currently armor is chosen by itemId which disregards both nbt and enchants so...
this plugin would need to add support for

  • exact item equiping (dont equip by item id, equip by item reference)
  • choosing armor pieces by which has better enchants
@u9g
Copy link
Member Author

u9g commented Apr 10, 2021

to be decided: how to make enchant matching (ie: is blast prot. 4 better then prot. 2?)

@TheDudeFromCI
Copy link
Member

It might be good to have a config that allows for the developer to specify priority weights.

@u9g
Copy link
Member Author

u9g commented Apr 11, 2021

It might be good to have a config that allows for the developer to specify priority weights.

we could do that, or we could use .sort on the array of items with the same itemType and just have a predefined sorter, or the developer can make their own sorter (which imo is much easier + will work for most people much better since they can debug it)

@TheDudeFromCI
Copy link
Member

It might be good to have a config that allows for the developer to specify priority weights.

we could do that, or we could use .sort on the array of items with the same itemType and just have a predefined sorter, or the developer can make their own sorter (which imo is much easier + will work for most people much better since they can debug it)

That would be fine, but I think it would be a good idea to add a list of premade common sorting methods, like max protection, or long lasting.

@TheDudeFromCI
Copy link
Member

Clarifying, I think the common sorting functions should be exported in addition to the ability for the user to create their own.

@u9g
Copy link
Member Author

u9g commented Apr 11, 2021

It might be good to have a config that allows for the developer to specify priority weights.

we could do that, or we could use .sort on the array of items with the same itemType and just have a predefined sorter, or the developer can make their own sorter (which imo is much easier + will work for most people much better since they can debug it)

That would be fine, but I think it would be a good idea to add a list of premade common sorting methods, like max protection, or long lasting.

I think this is a case of just having good defaults which would be max protection (as that is by definition what better armor would be) because imo the longlasting one would be very easy to implement as a sorter function, (can even be included as an example)

@TheDudeFromCI
Copy link
Member

It might be good to have a config that allows for the developer to specify priority weights.

we could do that, or we could use .sort on the array of items with the same itemType and just have a predefined sorter, or the developer can make their own sorter (which imo is much easier + will work for most people much better since they can debug it)

That would be fine, but I think it would be a good idea to add a list of premade common sorting methods, like max protection, or long lasting.

I think this is a case of just having good defaults which would be max protection (as that is by definition what better armor would be) because imo the longlasting one would be very easy to implement as a sorter function, (can even be included as an example)

That sounds good to me.

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

No branches or pull requests

2 participants