Skip to content

SlotHighlightClipProvider

Allows container screens to clip vanilla's static renderSlotHighlight(GuiGraphics, x, y, blitOffset) call to a sub-rect of the slot's own 16x16 bounds. Returning null skips the highlight draw entirely (fully clipped away); returning the full unclipped rect renders it normally.

Inheritors

Functions

slotHighlightClipRect

abstract fun slotHighlightClipRect(x: Int, y: Int): IntRect?

Returns the sub-rect (in slot-local pixel coordinates) to clip the slot highlight to at screen position x, y, or null to skip the highlight entirely.