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

Lexicon can be placed in bookshelf and on lectern #4494

Merged
merged 1 commit into from
Apr 14, 2024

Conversation

TheRealWormbo
Copy link
Collaborator

@TheRealWormbo TheRealWormbo commented Nov 27, 2023

Fixes #4488 by adding the lexicon item to the two relevant tags. Also needed to hook into the Patchouli lectern event handler to make sure the advancement for reading the lexicon for the first time works via lectern reading as well.

@TheRealWormbo
Copy link
Collaborator Author

Apparently the GitHub build did not like the Patchouli mixin, so no advancement for lectern readers for now.

@TheRealWormbo TheRealWormbo marked this pull request as draft November 28, 2023 08:47
@TheRealWormbo
Copy link
Collaborator Author

Added an event handler for right-clicks on lectern blocks with the Lexica Botania as the book. On Forge it is registered at "high" instead of default priority, so it won't get canceled by Patchouli's event handler. I didn't see a similar mechanism on Fabric, so there's a random chance for Patchouli's handler to run first and prevent Botania's handler for unlocking the advancement.

@TheRealWormbo TheRealWormbo marked this pull request as ready for review November 29, 2023 09:49
@TheRealWormbo TheRealWormbo marked this pull request as draft January 1, 2024 00:02
@TheRealWormbo
Copy link
Collaborator Author

A better implementation is on the way: TheRealWormbo@2c40fe8
That one uses an upcoming feature in Patchouli to properly trigger the advancement for whatever way the lexicon ends up being opened. I will adjust this PR accordingly once a new Patchouli version is available.

Fixes VazkiiMods#4488, but will not trigger advancement when opening the book from a lectern yet.
@TheRealWormbo TheRealWormbo marked this pull request as ready for review April 14, 2024 09:20
@TheRealWormbo TheRealWormbo merged commit 42b821d into VazkiiMods:1.20.x Apr 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Lexicon cannot be placed in Chiselled Bookshelf / on Lectern
1 participant