Class GuidePageTypes

java.lang.Object
net.ixdarklord.folios.api.client.page.GuidePageTypes

public final class GuidePageTypes extends Object
The kinds of page a book's entries can have, by the "type" their JSON names. A type without a namespace is Folios's: "text" is folios:text. Built in:
  • text: title, text.
  • spotlight: an item shown large (item, see GuideStack), title, text.
  • image: images (texture paths, shown in turn), title, text, border.
  • recipe: recipe or recipes (up to two ids), title, text; crafting, smelting, stonecutting and smithing recipes are drawn as such.
  • entity: entity (a type id), scale, offset, spin, title, text.
  • multiblock: a structure from pattern (layers top to bottom, each a list of rows) and mapping (character to block state), title, text.
  • links: links (entry ids, or {"entry": ..., "label": ...}), title, text.
  • quest: objectives (see GuideObjective), title, text, reward: a checklist with progress bars, live as the player plays; its entry shows its progress on its row, and a toast says when it is done.
  • empty: nothing, to start what follows on a new spread.
Every page may also have "anchor" (a name links can reach it by, entry:id#anchor) and the fields of a GuideLock.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable com.mojang.serialization.MapCodec<? extends GuidePage>
    get(net.minecraft.resources.ResourceLocation type)
     
    static net.minecraft.resources.ResourceLocation
    id(String written)
    A page type as written: a bare name is CoolCatLib's.
    static void
    register(net.minecraft.resources.ResourceLocation type, com.mojang.serialization.MapCodec<? extends GuidePage> codec)
    Adds a kind of page; register it while the client initialises, before resources load.
    static Set<net.minecraft.resources.ResourceLocation>
     

    Methods inherited from class java.lang.Object

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

    • register

      public static void register(net.minecraft.resources.ResourceLocation type, com.mojang.serialization.MapCodec<? extends GuidePage> codec)
      Adds a kind of page; register it while the client initialises, before resources load.
    • get

      @Nullable public static @Nullable com.mojang.serialization.MapCodec<? extends GuidePage> get(net.minecraft.resources.ResourceLocation type)
    • types

      public static Set<net.minecraft.resources.ResourceLocation> types()
    • id

      public static net.minecraft.resources.ResourceLocation id(String written)
      A page type as written: a bare name is CoolCatLib's.