Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScreenEvent.BackgroundRendered is not fired from most GUIs in 1.20.6 #1077

Open
mezz opened this issue Jun 9, 2024 · 1 comment
Open

ScreenEvent.BackgroundRendered is not fired from most GUIs in 1.20.6 #1077

mezz opened this issue Jun 9, 2024 · 1 comment
Labels
1.20.6 Targeted at Minecraft 1.20.6 1.21 Targeted at Minecraft 1.21 bug A bug or error regression Worked previously but doesn't anymore triage Needs triaging and confirmation

Comments

@mezz
Copy link
Contributor

mezz commented Jun 9, 2024

Minecraft Version: 1.20.6

NeoForge Version: 20.6.113-beta

Logs:
N/A

Steps to Reproduce:
N/A

Description of issue:
NeoForge fires the ScreenEvent.BackgroundRendered event at the end of Screen.renderBackground
Unfortunately, most (all?) vanilla GUIs override the renderBackground method and do not call super.renderBackground, so the event is not fired from most GUIs.

There seems to be a similar problem with ContainerScreenEvent.Render.Background, which is only fired from AbstractContainerScreen.render and not always fired from child classes like AbstractFurnaceScreen, CraftingScreen, etc.

It seems like the events need to be fired from many new places in order to be consistent.
I do not have a great solution for this problem, so I opened an issue instead of a PR.

@mezz mezz added the triage Needs triaging and confirmation label Jun 9, 2024
@Soaryn
Copy link
Contributor

Soaryn commented Jun 18, 2024

net.neoforged.neoforge.common.NeoForge.EVENT_BUS.post(new net.neoforged.neoforge.client.event.ScreenEvent.BackgroundRendered(this,  graphics));

likely needs to be called in the renderBackground after the renderBg call in AbstractContainerScreen. given AbstractContainerScreen doesn't call super since it shouldn't be doing the blurring that happens on something like the esc menu

That being said, I don't know what all is really expected to be called in the event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.20.6 Targeted at Minecraft 1.20.6 1.21 Targeted at Minecraft 1.21 bug A bug or error regression Worked previously but doesn't anymore triage Needs triaging and confirmation
Projects
None yet
3 participants