Class BookLayer

java.lang.Object
com.falkory.arcanumapi.book.layers.BookLayer
Direct Known Subclasses:
ImageLayer, NodeTreesLayer

public abstract class BookLayer extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected net.minecraft.resources.ResourceLocation
     
    protected float
     
    protected float
     
    protected float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract net.minecraft.nbt.CompoundTag
     
    static BookLayer
    deserialize(net.minecraft.nbt.CompoundTag passData)
     
    getFactory(net.minecraft.resources.ResourceLocation type)
     
    net.minecraft.nbt.CompoundTag
     
    static void
     
    net.minecraft.resources.ResourceLocation
    key()
     
    abstract void
    load(com.google.gson.JsonObject data, net.minecraft.resources.ResourceLocation file)
    Applies subclass-specific deserialization.
    static BookLayer
    makeLayer(net.minecraft.resources.ResourceLocation key, net.minecraft.resources.ResourceLocation type, float priority, com.google.gson.JsonObject content, net.minecraft.resources.ResourceLocation file, float speed, float vanishZoom)
     
    abstract void
    render(com.mojang.blaze3d.vertex.PoseStack stack, BookMainScreen parent, float frameMax, float spd)
    Called by the book screen.
    protected BookLayer
    setPriority(float priority)
     
    setSpeed(float speed)
     
    setVanishZoom(float vanishZoom)
     
    float
     
    abstract net.minecraft.resources.ResourceLocation
     
    float
     

    Methods inherited from class java.lang.Object

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

    • speed

      protected float speed
    • vanishZoom

      protected float vanishZoom
    • priority

      protected float priority
    • key

      protected net.minecraft.resources.ResourceLocation key
  • Constructor Details

    • BookLayer

      public BookLayer()
  • Method Details

    • makeLayer

      public static BookLayer makeLayer(net.minecraft.resources.ResourceLocation key, net.minecraft.resources.ResourceLocation type, float priority, com.google.gson.JsonObject content, net.minecraft.resources.ResourceLocation file, float speed, float vanishZoom)
    • deserialize

      public static BookLayer deserialize(net.minecraft.nbt.CompoundTag passData)
    • getFactory

      public static Supplier<BookLayer> getFactory(net.minecraft.resources.ResourceLocation type)
    • init

      public static void init()
    • speed

      public float speed()
    • vanishZoom

      public float vanishZoom()
    • setSpeed

      public BookLayer setSpeed(float speed)
    • setVanishZoom

      public BookLayer setVanishZoom(float vanishZoom)
    • setPriority

      protected BookLayer setPriority(float priority)
    • getPassData

      public net.minecraft.nbt.CompoundTag getPassData()
    • key

      public net.minecraft.resources.ResourceLocation key()
    • type

      public abstract net.minecraft.resources.ResourceLocation type()
    • data

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

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

      public abstract void render(com.mojang.blaze3d.vertex.PoseStack stack, BookMainScreen parent, float frameMax, float spd)
      Called by the book screen. All draws will be in a GL scissor, so no worries about drawing over the frame.
      Parameters:
      frameMax - 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.