Botania icon indicating copy to clipboard operation
Botania copied to clipboard

Lexicon can be placed in bookshelf and on lectern

Open TheRealWormbo opened this issue 2 years ago • 3 comments

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 avatar Nov 27 '23 22:11 TheRealWormbo

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

TheRealWormbo avatar Nov 27 '23 22:11 TheRealWormbo

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 avatar Nov 29 '23 09:11 TheRealWormbo

A better implementation is on the way: https://github.com/TheRealWormbo/Botania/commit/2c40fe893b562ee30cb74f5104d401046bd721f9 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.

TheRealWormbo avatar Jan 01 '24 00:01 TheRealWormbo