Skip to content

Conversation

@chrrs
Copy link
Owner

@chrrs chrrs commented Dec 20, 2025

I've been working for a little while on moving Scribble to it's own screens, instead of mixing into the vanilla BookEditScreen (so the decision I didn't make in #58, though that rewrite made this a lot easier!). This makes the code a lot less complex by removing the mess that is BookEditScreenMixin, and a lot more flexible.

It's rewritten so that book viewing and book editing build on the same book screen, which is also built with the ability to show multiple pages at once. Rich text editing is basically untouched (thanks to previous me moving all that logic to RichEditBox), commands have been updated to support multi-pages.

Doing this also wins a lot of mod compat (there's only 4 small mixins), though it loses some nice out-of-the-box compat (ex. Symbol Chat). Most importantly though, it opens up the door to a lot of future improvements. This is probably a large enough change to justify a 2.0 release :)

Closes #81
Closes #73
Closes #36

Works toward #91
Works toward #78 (though I don't think I'll do this one)
Works toward #23


Also in this PR:

  • Experiment with moving the config screen to YACL. I think I like it more than Cloth Config, though I think even less people have YACL installed. In any case, I don't want to force a dependency, so it's still optional.
  • Use JSpecify annotations, and @NullMarked everything.
  • Clean up platform code so it's all in one place.
  • Add contributing guidelines, just to be sure.
  • Removed manual Debugify compat, since that's merged into the main mod.
  • Add a small settings action button on the bottom left, so we don't need Mod Menu to configure!

Still to do before this can be merged:

  • Add back the page buttons.
  • Add back discard-unsaved-work confirmations.
  • Add back saving/loading of books.
  • Add a lectern screen, since that's still missing.
  • Improve the double page texture and text spacing.
  • Maybe add a config options to open the original book screens when holding SHIFT?
  • Center the original book screens if the config option is set. (i'll decide what to do here later)
    • Book sign screen is still vanilla, so it's jarring to transition to non-centered signing from a centered edit screen.
    • You can see the vanilla lectern screen with Amendments for example.
  • Decide if I want to keep YACL, if so, move text to translatable strings. (for now, we're keeping YACL, but I really want to move to a custom config system later)
  • Thoroughly test every single thing on both loaders.

For later, not necessarily this PR:

  • Add issue templates.
  • Figure out if we can make a universal Fabric/NeoForge jar.
  • Redesign the modifier buttons. Their hover-outline broke a few updates ago, and I think they can just be a bit better in general.
    • Fixed the hover outline for now.

(this is an old screenshot, the texture has since changed and the margins are less cramped)
2025-12-20_16 48 51

(not sure if I'll keep the YACL config screen yet, but I definitely like the organisation and the option descriptions)
2025-12-20_16 47 33

@chrrs chrrs force-pushed the scribble-2-experiments branch from 424475a to 18b075c Compare December 20, 2025 16:31
@chrrs chrrs force-pushed the scribble-2-experiments branch 3 times, most recently from 5e8a2d8 to 00073b5 Compare December 21, 2025 20:22
@chrrs chrrs force-pushed the scribble-2-experiments branch from 00073b5 to 402e5a5 Compare December 23, 2025 15:41
@chrrs
Copy link
Owner Author

chrrs commented Dec 24, 2025

Hmmm, double pages have an issue when it comes to lecterns: since it shows two pages at once, you can't skip a single page. This means if you're using double pages, flipping through a book increases the page number by two:

  • Other players who aren't using double pages skip a page entirely.
  • Books and lecterns give off a redstone signal using a comparator based on the page. With double pages, you can't access some pages.
  • Though, other players flipping through a book shows for double page viewers perfectly.

There are then a few things I can think of here:

  • Leave it like this. It's weird behaviour, but not game-breaking? Though I think I'd definitely consider it a "bug" of some kind. (this is what the 'Scholar' mod does).
  • Add a button on the page to 'switch' / bookmark the page as the page the lectern page (this is what the 'Bedrock Books' mod does). I don't think I like that solution though, since it's not really what that mechanic is supposed to be. For example, people can make a trap that only activates when you go to the last page of a book, which this solution would just completely disregard.
  • Force single-page view in lecterns, at least in multiplayer (and singleplayer a config option?). This is still not really ideal, especially since double page makes sense for lecterns specifically, looking at the model.

Bedrock also shows two pages, but for this reason it has a different formula for calculating lectern signal strength. I don't want to change that.

lecterns have it out for me, they're always the enemy of good ideas >:(

@J4PC
Copy link
Contributor

J4PC commented Dec 24, 2025

Maybe this could be addressed by using the page where the cursor is. Because the cursor can only be on one page at a time so if I spectate someone in a lectern and he has double page layout and I don't I always would see the page where his cursor is at same goes for the signal strength.

@chrrs
Copy link
Owner Author

chrrs commented Dec 24, 2025

Definitely an interesting idea, I'm not sure how practical it would be, since it's not really an 'action' you take. Especially if you want to select a specific page for a redstone strength, you have to be really careful with how you move your mouse (think those website menus where if you accidentally move off the menu, it disappears and you have to redo it all over again). Though I don't have any better ideas.

@J4PC
Copy link
Contributor

J4PC commented Dec 24, 2025

Oh sorry, now I realize that I didn't explain my idea properly: I didn't mean the mouse cursor, I meant the text cursor.

@chrrs
Copy link
Owner Author

chrrs commented Dec 24, 2025

Oh, well in that case, you can't edit lectern books in vanilla, so there is no text cursor :)

@J4PC
Copy link
Contributor

J4PC commented Dec 24, 2025

Yeah, I figured it would have synergies with the editing GUI on lecterns feature, or if that is not present, the definitely lamer version: just a text cursor without the ability to edit. That way the user gets the information and give the user control. But I am also not 100% sold on the idea. I just thought it is a bit more elegant than adding a dedicated button.

@chrrs chrrs marked this pull request as ready for review December 28, 2025 16:50
@chrrs chrrs merged commit b04d7df into main Dec 28, 2025
1 check passed
@chrrs chrrs deleted the scribble-2-experiments branch December 30, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants