Class FoliosIcon

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

public final class FoliosIcon extends Object
A book's, category's or entry's 16-pixel icon: items (FoliosStack, e.g. "minecraft:compass"), or a texture, named by its path ("mymod:textures/gui/guide/compass.png" or {"texture": "..."}).
  • Field Details

  • Method Details

    • of

      public static FoliosIcon of(FoliosStack stack)
    • texture

      public static FoliosIcon texture(net.minecraft.resources.ResourceLocation texture)
    • read

      public static FoliosIcon read(@Nullable @Nullable com.google.gson.JsonElement json)
      Reads an icon from JSON; NONE for null.
    • isEmpty

      public boolean isEmpty()
    • stack

      @Nullable public @Nullable FoliosStack stack()
    • texture

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation texture()
    • draw

      public void draw(FoliosPainter painter, int x, int y)
      Draws it on a page, 16 pixels square at (x, y).
    • draw

      public void draw(GuiGraphicsExtractor graphics, int x, int y, int size, float seconds)
      Draws it on a screen, size pixels square at (x, y), with no tooltip.