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

Add maxDurability field, fix handling item sent by server with new sentByServer arg #106

Merged
merged 3 commits into from
Jul 30, 2023

Conversation

extremeheat
Copy link
Member

No description provided.

@frej4189
Copy link

This will still cause issues in mineflayer when using anvil on items with full durability in 1.13/1.14 due to

if (itemOne.name !== 'enchanted_book') finalItem.durabilityUsed = itemOne.durabilityUsed - data.fixedDurability

@extremeheat
Copy link
Member Author

OK, so I guess in vanilla it only updates the item damage if the anvil changed the item's durability? Seems so per my comment in #105. In which case simply not updating the durability if it didn't change seems like the more correct solution.

@frej4189
Copy link

Upon further inspection the combine function in anvil.js seems to have a lot of flaws that will need to be addressed. So I think it makes sense to merge this PR as-is and then address anvil issues in another PR

@rom1504
Copy link
Member

rom1504 commented Jul 30, 2023

@extremeheat can you open the corresponding PR in mineflayer so we make sure it works ?

@frej4189
Copy link

@extremeheat can you open the corresponding PR in mineflayer so we make sure it works ?

Updated my test PR to depend on this PR instead of #105

@rom1504 rom1504 merged commit d36111d into PrismarineJS:master Jul 30, 2023
@rom1504
Copy link
Member

rom1504 commented Jul 30, 2023

/makerelease 1.14.0

@rom1504bot rom1504bot mentioned this pull request Jul 30, 2023
@extremeheat extremeheat deleted the durability-fix branch July 30, 2023 17:23
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