Class NodeTreesLayer

java.lang.Object
com.falkory.arcanumapi.book.layers.BookLayer
com.falkory.arcanumapi.book.layers.NodeTreesLayer
All Implemented Interfaces:
NodeLayer

public class NodeTreesLayer extends BookLayer implements NodeLayer
  • Field Details

    • TYPE

      public static final net.minecraft.resources.ResourceLocation TYPE
    • nodes

      protected Map<net.minecraft.resources.ResourceLocation,BookNode> nodes
  • Constructor Details

    • NodeTreesLayer

      public NodeTreesLayer()
  • Method Details

    • type

      public net.minecraft.resources.ResourceLocation type()
      Specified by:
      type in class BookLayer
    • data

      public net.minecraft.nbt.CompoundTag data()
      Specified by:
      data in class BookLayer
      Returns:
      Any subclass-specific data that needs to be recorded by the serializer
    • load

      public void load(com.google.gson.JsonObject data, net.minecraft.resources.ResourceLocation file)
      Description copied from class: BookLayer
      Applies subclass-specific deserialization.
      Specified by:
      load in class BookLayer
      Parameters:
      data - The json object passed by the main BookLayer deserializer
    • render

      public void render(com.mojang.blaze3d.vertex.PoseStack stack, BookMainScreen parent, float drawSize, float spd)
      Description copied from class: BookLayer
      Called by the book screen. All draws will be in a GL scissor, so no worries about drawing over the frame.
      Specified by:
      render in class BookLayer
      drawSize - Maximum width/height of the scissors.
      spd - A combination scale/scroll multiplication factor.
      1.0 is at true scale when zoomed out, 2.0 is double size. Values less than 1.0 will cause issues.
    • node

      public BookNode node(BookNode node)
      Description copied from interface: NodeLayer
      Takes a BookNode and returns a contained node with matching ID
      Specified by:
      node in interface NodeLayer
    • nodes

      public List<BookNode> nodes()
      Specified by:
      nodes in interface NodeLayer
      Returns:
      A list of all nodes the layer contains.
    • getNode

      public BookNode getNode(net.minecraft.resources.ResourceLocation key)
      Description copied from interface: NodeLayer
      Takes a ResourceLocation and returns a contained node with matching ID
      Specified by:
      getNode in interface NodeLayer
    • getNodes

      public Map<net.minecraft.resources.ResourceLocation,BookNode> getNodes()
      Specified by:
      getNodes in interface NodeLayer
      Returns:
      The map of the layer's nodes with IDs attached.