Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UScreen: Fix background being drawn twice on 1.20.2+
The contract for UScreen has always been that the user needs to explicitly call `onDrawBackground` from their `onDrawScreen` override if they want their screen to have a background; that's how it used to work in Minecraft prior to 1.20.2. As of 1.20.2, `Screen.render` (called by `onDrawScreen`) now also draws the background in addition to vanilla elements, as such the background is drawn twice; and if a custom screen wishes to not have any background, it's draw anyway. This commit fixes that by suppressing the vanilla background method call when it happens within our `super.render` call. That way users retain control over the background, and in a way that's consistent across versions. Linear: EM-2544 GitHub: #69
- Loading branch information