Class FoliosLibrary

java.lang.Object
net.ixdarklord.folios.internal.client.FoliosLibrary

public final class FoliosLibrary extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Where the docs say how to move a book to the current format.
    static final String
    The docs site's tool that updates a book's files to the current format.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable FoliosBook
    book(net.minecraft.resources.Identifier id)
     
    static Map<net.minecraft.resources.Identifier, FoliosBook>
     
    static @Nullable com.google.gson.JsonObject
    build(net.minecraft.resources.Identifier id)
    A build file as written, by its path under folios/ without ".json" (mymod:my_guide/builds/tower); null for none.
    celebrations(net.minecraft.resources.Identifier book)
    How a book celebrates the player finishing part of it ("celebrations" in book.json); off unless it says.
    static FoliosIcon
    coverIcon(net.minecraft.resources.Identifier book)
    The icon set in the gem of a book's cover: its "cover" › "icon" (an item or a texture); FoliosIcon.NONE, the plain gem, when it gives none or "none".
    static float
    coverIconSize(net.minecraft.resources.Identifier book)
    How large a book's cover icon is, of its usual size: its "cover" › "icon_size", 1 by default.
    static @Nullable net.minecraft.network.chat.Component
    credit(net.minecraft.resources.Identifier book)
    The book item's credit line: the words its "credits" give before its authors (else its folios.<namespace>.<path>.credits.prefix translation, else "Written by"), and its authors, joined the language's way (else its ...credits.authors translation); null when it names no authors.
    layoutOf(net.minecraft.resources.Identifier book)
    How a book sets its elements where its pages don't say ("overflow", "alignment"...
    static void
    reload(net.minecraft.server.packs.resources.ResourceManager manager)
     
    static @Nullable FoliosSession
    session(net.minecraft.resources.Identifier id)
    A book's laid-out pages, kept between openings; null when there is no such book.
    static @Nullable FoliosSession
    session(net.minecraft.resources.Identifier id, int width, int height)
    A book's laid-out pages for pages width by height; the default session for the default page size.
    static String
    textKey(net.minecraft.resources.Identifier book, String what)
    The translation key of a book's own text: folios.<namespace>.<path>.<what>, a / in the path as a dot.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MIGRATION

      public static final String MIGRATION
      Where the docs say how to move a book to the current format.
      See Also:
    • UPGRADER

      public static final String UPGRADER
      The docs site's tool that updates a book's files to the current format.
      See Also:
  • Method Details

    • book

      public static @Nullable FoliosBook book(net.minecraft.resources.Identifier id)
    • books

      public static Map<net.minecraft.resources.Identifier, FoliosBook> books()
    • credit

      public static @Nullable net.minecraft.network.chat.Component credit(net.minecraft.resources.Identifier book)
      The book item's credit line: the words its "credits" give before its authors (else its folios.<namespace>.<path>.credits.prefix translation, else "Written by"), and its authors, joined the language's way (else its ...credits.authors translation); null when it names no authors.
    • coverIcon

      public static FoliosIcon coverIcon(net.minecraft.resources.Identifier book)
      The icon set in the gem of a book's cover: its "cover" › "icon" (an item or a texture); FoliosIcon.NONE, the plain gem, when it gives none or "none".
    • coverIconSize

      public static float coverIconSize(net.minecraft.resources.Identifier book)
      How large a book's cover icon is, of its usual size: its "cover" › "icon_size", 1 by default.
    • textKey

      public static String textKey(net.minecraft.resources.Identifier book, String what)
      The translation key of a book's own text: folios.<namespace>.<path>.<what>, a / in the path as a dot.
    • celebrations

      public static CelebrationSettings celebrations(net.minecraft.resources.Identifier book)
      How a book celebrates the player finishing part of it ("celebrations" in book.json); off unless it says.
    • build

      public static @Nullable com.google.gson.JsonObject build(net.minecraft.resources.Identifier id)
      A build file as written, by its path under folios/ without ".json" (mymod:my_guide/builds/tower); null for none.
    • session

      public static @Nullable FoliosSession session(net.minecraft.resources.Identifier id)
      A book's laid-out pages, kept between openings; null when there is no such book.
    • session

      public static @Nullable FoliosSession session(net.minecraft.resources.Identifier id, int width, int height)
      A book's laid-out pages for pages width by height; the default session for the default page size.
    • reload

      public static void reload(net.minecraft.server.packs.resources.ResourceManager manager)
    • layoutOf

      public static ElementLayout layoutOf(net.minecraft.resources.Identifier book)
      How a book sets its elements where its pages don't say ("overflow", "alignment"... in its book.json).