Class GuideStack

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

public final class GuideStack extends Object
Items as a page names them, worked out only when they're first drawn (item components need the world's registries, which a book loaded with resources doesn't have yet). In JSON it is one of:
  • "minecraft:diamond", or "minecraft:diamond*4" for a count;
  • "#minecraft:logs": every item of a tag, shown in turn;
  • an item stack object, {"id": "minecraft:potion", "count": 1, "components": {...}};
  • a list of any of these, shown in turn.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<GuideStack>
     
    static final float
    How long each of several items is shown, in seconds.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.item.ItemStack
    at(float seconds)
    The stack shown at a time, in seconds: each in turn when there are several.
    net.minecraft.world.item.ItemStack
     
    void
    Forgets what it resolved to, for after registries or tags change.
    static GuideStack
    of(net.minecraft.resources.Identifier item)
    One item.
    List<net.minecraft.world.item.ItemStack>
    Every stack it stands for; a missing item is a barrier, so the mistake shows.

    Methods inherited from class Object

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

    • CODEC

      public static final com.mojang.serialization.Codec<GuideStack> CODEC
    • CYCLE_SECONDS

      public static final float CYCLE_SECONDS
      How long each of several items is shown, in seconds.
      See Also:
  • Method Details

    • of

      public static GuideStack of(net.minecraft.resources.Identifier item)
      One item.
    • stacks

      public List<net.minecraft.world.item.ItemStack> stacks()
      Every stack it stands for; a missing item is a barrier, so the mistake shows.
    • at

      public net.minecraft.world.item.ItemStack at(float seconds)
      The stack shown at a time, in seconds: each in turn when there are several.
    • first

      public net.minecraft.world.item.ItemStack first()
    • forget

      public void forget()
      Forgets what it resolved to, for after registries or tags change.