Class ImageLayer

java.lang.Object
com.falkory.arcanumapi.book.layers.BookLayer
com.falkory.arcanumapi.book.layers.ImageLayer

public class ImageLayer extends BookLayer
  • Field Details

    • TYPE

      public static net.minecraft.resources.ResourceLocation TYPE
  • Constructor Details

    • ImageLayer

      public ImageLayer()
    • ImageLayer

      public ImageLayer(String image)
    • ImageLayer

      public ImageLayer(String image, float speed)
  • 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 tickDelta)
      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.
      tickDelta - 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.