Roughly Enough Items Fabric/Forge/NeoForge (REI)

Roughly Enough Items Fabric/Forge/NeoForge (REI)

40M Downloads

[Suggestion] Replace manual background drawing with calls to Screen::renderBackground

PieKing1215 opened this issue ยท 0 comments

commented

Is there any particular reason the background tint is drawn manually instead of using the inherited Screen::renderBackground method?

this.fillGradient(matrices, 0, 0, this.width, this.height, -1072689136, -804253680);

this.fillGradient(matrices, 0, 0, this.width, this.height, -1072689136, -804253680);

if (this.minecraft.level != null) {
this.fillGradient(matrices, 0, 0, this.width, this.height, -1072689136, -804253680);
} else {
this.fillGradient(matrices, 0, 0, this.width, this.height, -16777216, -16777216);
}

Changing the manual fillGradients to renderBackground would have basically no affect on functionality.
For the first two, there should be no difference since they are only seen ingame.
For the Uncertain screen, going into it from the main menu would make it use the dirt background instead of solid black.

Motivation: One of my mods mixins into Screen::renderBackground, but in order to support REI, I would have to mixin into each of these internal classes as well, which would be pretty icky.