Klasse ItemIconCache

java.lang.Object
de.luckymcdev.foundryengine.client.imgui.ItemIconCache

public class ItemIconCache extends Object
Manages the lifecycle of item icon textures rendered offscreen via OffscreenRenderer.

Call order each frame:

  1. processQueue(OffscreenRenderer) — drains GPU readbacks and starts new renders
  2. ImGui rendering — get(ItemStack) returns cached ImTextures
  • Konstruktordetails

    • ItemIconCache

      public ItemIconCache()
  • Methodendetails

    • get

      public @Nullable ImTexture get(net.minecraft.world.item.ItemStack stack)
      Returns the cached icon for stack, or null if it hasn't been rendered yet (it will be queued automatically).
    • processQueue

      public void processQueue(OffscreenRenderer renderer)
      Drains arrived GPU readbacks from renderer into the cache, then kicks off up to 25 new render jobs. Call this once per frame before any ImGui rendering.
    • clear

      public void clear()