Modonomicon

Modonomicon

1M Downloads

Lecterns are not able to open any book except Modonomicon's ones.

DenisMasterHerobrine opened this issue ยท 1 comments

commented

Describe the bug
When you put any written book onto vanilla Lectern, it will appear on it, but the Lectern won't allow you to read the book.

To Reproduce

  1. Place Lectern into the world, get any Written Book with something in it.
  2. Right-click with the book and place on the Lectern. Try to open it endlessly...
  3. Try to place a Modonomicon book onto other Lectern and find out that it works as expected...
  4. ๐Ÿ˜ข
  5. Also notice that every attempt to open the vanilla book throws an error: [Modonomicon/]: Modonomicon Lectern: ItemStack has no tag!.

Expected behavior
Any lectern allows you to open both vanilla and Modonomicon books.

Screenshots

test.mp4

System (please complete the following information):

  • Modonomicon Version: 1.100.2 (the pack is using the build) / 1.102.1 (the latest release at the moment of writing)
  • OS: Windows 10/11.
  • Minecraft Version: 1.21.1
  • Modpack Link and Version, or list of mods: There are a bunch of them, but the same is happening with just Modonomicon.

Additional context
This behaviour messes up books in the latest 1.21.1 branch from there:

if (bookId != null) {
Services.NETWORK.sendTo(player, new OpenBookOnClientMessage(bookId));
} else {
Modonomicon.LOG.error("Modonomicon Lectern: ItemStack has no tag!");
}

It checks for a Modonomicon book from IDs stored in Modonomicon, while the vanilla book does not have any Modonomicon ID in it, so that's why vanilla books are kind of broken when used on Lecterns. Any other mod providing custom books that are compatible with Lecterns are also ignored and throw the [Modonomicon/]: Modonomicon Lectern: ItemStack has no tag! error.
Removing the Modonomicon solves the issue and any other Vanilla/custom book works as expected. Originally reported by the other player to me.

commented

Uhh ok yeah that needs some more thought to handle all types of books properly. Will fix asap!