Interface GuiPaintWorklet
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Trusted mod-code callback that records bounded, renderer-neutral GUI paint commands.
Worklets never receive Minecraft renderer objects. The callback may use animation time, but should provide a stable
cacheKey(GuiPaintWorkletContext) when its output can be reused.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectcacheKey(GuiPaintWorkletContext context) Returns an immutable reusable command key, ornullto record each execution.voidpaint(GuiPaintWorkletContext context, GuiPaintRecorder recorder)
-
Method Details
-
paint
-
cacheKey
Returns an immutable reusable command key, ornullto record each execution. Width, height, physical scale, states and declared properties are included automatically. Animation time is excluded; time-dependent output must include its clock or a quantized time bucket in this key. Inputs and returned keys must not mutate.
-