ContainerScreenEvent$Render$Background
runs after renderables are drawn
#9862
Labels
Triage
This request requires the active attention of the Triage Team. Requires labelling or reviews.
Minecraft Version: 1.20.4
Forge Version: 49.0.26
Description of issue:
In 1.20.1 the order in
AbstractContainerScreen::render
used to be:AbstractContainerScreen::renderBg
Screen::renderBackground
ContainerScreenEvent$Render$Background
(Forge event)Screen::render
(super method)In 1.20.2+
AbstractContainerScreen::renderBg
has been removed in favor of usingScreen::renderBackground
which is now implemented in subclasses. Therefore the order inAbstractContainerScreen::render
has changed to:Screen::render
(super method)Screen::renderBackground
ContainerScreenEvent$Render$Background
(Forge event)This new behavior makes it impossible to render background sprites which are drawn behind renderables like buttons & widgets.
For intentionally rendering sprites in front of renderables
ContainerScreenEvent$Render$Foreground
already exists.My suggestion for restoring the 1.20.1 behavior would be to move firing
ContainerScreenEvent$Render$Background
toScreen::render
(with aninstanceof
check forAbstractContainerScreen
) right in-between the call toScreen::renderBackground
and screen renderables being drawn.Moving
ContainerScreenEvent$Render$Background
toAbstractContainerScreen::renderBackground
is not a good option as it would fire after the black transparent background overlay is drawn, but before the menu background sprite is.The text was updated successfully, but these errors were encountered: