Class BookLayer
java.lang.Object
com.falkory.arcanumapi.book.layers.BookLayer
- Direct Known Subclasses:
ImageLayer,NodeTreesLayer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.resources.ResourceLocationprotected floatprotected floatprotected float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract net.minecraft.nbt.CompoundTagdata()static BookLayerdeserialize(net.minecraft.nbt.CompoundTag passData) getFactory(net.minecraft.resources.ResourceLocation type) net.minecraft.nbt.CompoundTagstatic voidinit()net.minecraft.resources.ResourceLocationkey()abstract voidload(com.google.gson.JsonObject data, net.minecraft.resources.ResourceLocation file) Applies subclass-specific deserialization.static BookLayermakeLayer(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 voidrender(com.mojang.blaze3d.vertex.PoseStack stack, BookMainScreen parent, float frameMax, float spd) Called by the book screen.protected BookLayersetPriority(float priority) setSpeed(float speed) setVanishZoom(float vanishZoom) floatspeed()abstract net.minecraft.resources.ResourceLocationtype()float
-
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
-
getFactory
-
init
public static void init() -
speed
public float speed() -
vanishZoom
public float vanishZoom() -
setSpeed
-
setVanishZoom
-
setPriority
-
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 mainBookLayerdeserializer
-
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.
-