Class GuiImageSource
java.lang.Object
com.render.api.gui.GuiImageSource
Describes a raster image that can be loaded from a URL or a jar resource.
-
Method Summary
Modifier and TypeMethodDescriptioncacheKey()default longfloatfloatcom.render.api.gui.GuiLoadedAssetload()default com.render.api.gui.GuiAssetSourcerasterVariant(float physicalWidth, float physicalHeight) static GuiImageSourceresource(net.minecraft.resources.Identifier resourceId) Creates an image source backed by a resource inside the jar or active resource packs.default com.render.api.gui.GuiAssetSource.LoadSnapshotCaptures the exact immutable version consumed by one background load.static GuiImageSourceCreates an image source backed by a URL.
-
Method Details
-
resource
Creates an image source backed by a resource inside the jar or active resource packs.- Parameters:
resourceId- resource identifier such asmodid:textures/gui/panel.png- Returns:
- image source
-
url
Creates an image source backed by a URL.- Parameters:
url- image URL- Returns:
- image source
-
cacheKey
-
hintWidth
public float hintWidth() -
hintHeight
public float hintHeight() -
load
-
generation
default long generation() -
rasterVariant
default com.render.api.gui.GuiAssetSource rasterVariant(float physicalWidth, float physicalHeight) -
snapshotForLoad
default com.render.api.gui.GuiAssetSource.LoadSnapshot snapshotForLoad()Captures the exact immutable version consumed by one background load.
-