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

Book Binders store lvl as Int #430

Closed
Bloo-dev opened this issue Jul 2, 2020 · 3 comments
Closed

Book Binders store lvl as Int #430

Bloo-dev opened this issue Jul 2, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@Bloo-dev
Copy link
Member

Bloo-dev commented Jul 2, 2020

Describe the bug
When binding a book from pages in a book binder, the resulting enchanted book will have its enchantment lvl fields stored as int. Whilst this is supported by most parts of minecraft, modules that test specifically for lvl:<something>s will fail to detect this as they are expecting a short.
One module affected by this is Zauber, Crystals can't be crafted using these Book Binder books. As lvl should be a short by default, Book Binders should be adapted. However, the Book Binders module never actually specifies to store as an integer and the conversion is done by the game when copying the enchantments into storage.

To Reproduce
Steps to reproduce the behavior:

  1. Craft an Enchanted Book from Pages
  2. Inspect the NBT before placing the Book in a container

Expected behavior
lvl should be a short

Fix
I really don't know.

Workaround
Placing the enchanted book in a container will update the lvl tags to be shorts.

Environment

  • Minecraft version: 1.15.2
  • Server version: 1.15.2, Paper (git-Paper-371), Public Server 6

Additional context
Add any other context about the problem here.

@Bloo-dev Bloo-dev added bug Something isn't working needs investigation labels Jul 2, 2020
@andantet
Copy link
Contributor

andantet commented Jul 2, 2020

I haven't looked at the code, but if it only exists for a tick you can copy it to storage or something

@Bloo-dev
Copy link
Member Author

This might be fixed in 1.17.1.

@Bloo-dev
Copy link
Member Author

This no longer occurs in 1.17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants