mistrk7 / librarians-balance

A datapack to balance Librarians
Other
0 stars 1 forks source link

Compatibility with Tome Reader. #8

Closed Ynaught closed 4 months ago

Ynaught commented 4 months ago

Tomb Reader is a mod that also lets you put enchantment books on a lectern with additional functionality once it's there. However, because this mod is rightclick to place and remove books, it removes the book the moment you place it.

Proposed solution: Add a new config option - Compatibility Mode.

Compatibility mode disables the mechanic to remove book via rightclicking. People could still remove the book by breaking the lectern manually in the worse case scenario or just disable the setting that they had already manually enabled. Players should only enable this setting if other mods are giving them issues when placing books on the lectern.

With this instance in particular, Tomb Reader gives the lectern a GUI that has a button to "take book" similar to how a book and quill does it. Alternatively, other conflicting mods will already have the rightclick to remove book option so the the redundancy would not be needed in either regard.

I also think sneak+right click should always activate as if in compat-mode by default regardless of config setting. You can still sneak+right click to place, but not to remove.

mistrk7 commented 4 months ago

Sounds useful, i'll look into it. Could you send me a link to this Tomb Reader mod? I can't find it anywhere.

Ynaught commented 4 months ago

https://modrinth.com/mod/tome-reader

I reported an issue with them as well about the incompatibility.

mistrk7 commented 4 months ago

I have made something that works with Tome Reader for you (minecraft 1.21): librarians-balance.zip It kind of works. But I would have to talk to the developer to implement this properly.

I will look into the idea of a compatibilty mode and supporting more mods in the future, so i'll keep this thread open for others to look at. Thanks for posting 👍

Ynaught commented 4 months ago

I use the mod version. This is because the mod version allows me to update everything automatically within my launcher. So as soon as you update the modrinth page to include the updated mod, I'll happily give it a shot.

mistrk7 commented 4 months ago

Ah okay. please test this as a mod version (unzip) @Ynaught librarians-balancemod.zip

Ynaught commented 4 months ago

You might want to rename the file before you upload it to any sites. Ya know, so it's more consistant with your previous naming scheme. Probably librarians-balance-3.1.1 or librarians-balance-3.2 or something like that. That being said, I'll be testing it later tonight and get back to you then.

mistrk7 commented 4 months ago

@RamGemes FYI I still need to properly commit my compatibility changes so mod isn't fully compatible just yet. I'll keep you updated.

mistrk7 commented 4 months ago

Thank you @Ynaught for raising the issue and @RamGemes for working with me. datapack/mod cross compatibility is really cool

Ynaught commented 4 months ago

Fully agreed, definitely both cool and interesting. That being said, there is one. . . MINOR difference with your datapack with the before and after. When you took the book off the lectern, the villager would always revert to it's vanilla trade. Now, it keeps the trade from the lectern even after you remove the book. This didn't happen when the 2 mods were semi-compat (when you updated yours to not break, where his was updated to have the change you requested but before you implemented his change to your datapack to be fully compact; i'm saying this didn't happen then). Something you did to add full compat must have broke something when removing the book.

It's a minor issue that only plays an effect if you care about the vanilla trade. Theres a trinity I use of mods for enchanting. That being this one, tome reader and grindstone enchantments. The last of the 2 allows you to take enchantments off an item and put them on the book. Then after I do that, I can sort them using tome reader and then level them up via this datapack. Combine all that with the OP compact "Infested Allay" XP farm, and you got SUPER easy enchanting setup. My point in bringing this up is I personally care very little for the default enchantment as I always keep a spare of every book. . . but that doesn't mean there won't be others who might appreciate the ability.

mistrk7 commented 4 months ago

It should still be there. try replacing the lectern

Ynaught commented 4 months ago

I did. Idk why the reset doesn't work anymore. I can give a rundown of a few things that happened when I loaded into my world:

I went to the lectern to put on a modded book called "Speed boost I" (apparently part of the wall jump mod). I put it on, the librarian came over and his trade didn't update, I took the book off and put it back 3 m ore times until I realized. Wait, his starting trade is paper and bookshelves. . . that's not right. Then I noticed his XP was at 0. So at this point I start panicking thinking my bro did a dead'd.

I go around the corner and see him. AYO GREG, SOMEONE STOLE YOUR FKING JOB!!!! That's when I replace the lectern to get him his job back, put the book on the table before he claimed the job site, swapped a few times between looting III and jump boost I and only then did I realize he was not resetting to his default trade on book removal.

So yeah, no idea what's going on there. It's minor regardless but. . . eh.