Skip to content

SlotLayerDepthContext

Tracks when slot rendering overrides the default GUI depth so downstream render calls (like GuiGraphics#renderItem) can adjust their transforms.

Functions

currentDepth

open fun currentDepth(): Float

isActive

open fun isActive(): Boolean

pop

open fun pop()

push

open fun push(depth: Float)

setPendingOverride

open fun setPendingOverride(depth: Float)

Hands off a depth override computed while still inside renderSlot (see AbstractContainerScreenMixin) to the loader-specific mixin that wraps the actual GuiGraphics#renderItem call - NeoForge moved that call out of renderSlot into its own renderSlotContents method, so the two can no longer share a @Unique field on one mixin class.

takePendingOverride