Class NeoForgeLoadingOverlay
java.lang.Object
net.minecraft.client.gui.screens.Overlay
net.minecraft.client.gui.screens.LoadingOverlay
net.neoforged.neoforge.client.loading.NeoForgeLoadingOverlay
- All Implemented Interfaces:
Renderable
This is an implementation of the LoadingOverlay that calls back into the early window rendering, as part of the
game loading cycle. We completely replace the
render(GuiGraphics, int, int, float)
call from the parent
with one of our own, that allows us to blend our early loading screen into the main window, in the same manner as
the Mojang screen. It also allows us to see and tick appropriately as the later stages of the loading system run.
It is somewhat a copy of the superclass render method.-
Field Summary
Modifier and TypeFieldDescriptionprivate float
private final net.neoforged.fml.earlydisplay.DisplayWindow
private long
private final Minecraft
private final net.neoforged.fml.loading.progress.ProgressMeter
private final ReloadInstance
Fields inherited from class net.minecraft.client.gui.screens.LoadingOverlay
FADE_IN_TIME, FADE_OUT_TIME
-
Constructor Summary
ConstructorDescriptionNeoForgeLoadingOverlay
(Minecraft mc, ReloadInstance reloader, Consumer<Optional<Throwable>> errorConsumer, net.neoforged.fml.earlydisplay.DisplayWindow displayWindow) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addQuad
(BufferVertexConsumer bufferbuilder, float x0, float x1, float y0, float y1, net.neoforged.fml.earlydisplay.ColourScheme.Colour colour, float fade) static Supplier
<LoadingOverlay> newInstance
(Supplier<Minecraft> mc, Supplier<ReloadInstance> ri, Consumer<Optional<Throwable>> handler, net.neoforged.fml.earlydisplay.DisplayWindow window) void
render
(GuiGraphics graphics, int mouseX, int mouseY, float partialTick) Methods inherited from class net.minecraft.client.gui.screens.LoadingOverlay
isPauseScreen, registerTextures
-
Field Details
-
minecraft
-
reload
-
onFinish
-
displayWindow
private final net.neoforged.fml.earlydisplay.DisplayWindow displayWindow -
progressMeter
private final net.neoforged.fml.loading.progress.ProgressMeter progressMeter -
currentProgress
private float currentProgress -
fadeOutStart
private long fadeOutStart
-
-
Constructor Details
-
NeoForgeLoadingOverlay
public NeoForgeLoadingOverlay(Minecraft mc, ReloadInstance reloader, Consumer<Optional<Throwable>> errorConsumer, net.neoforged.fml.earlydisplay.DisplayWindow displayWindow)
-
-
Method Details
-
newInstance
public static Supplier<LoadingOverlay> newInstance(Supplier<Minecraft> mc, Supplier<ReloadInstance> ri, Consumer<Optional<Throwable>> handler, net.neoforged.fml.earlydisplay.DisplayWindow window) -
render
- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classLoadingOverlay
-
addQuad
private static void addQuad(BufferVertexConsumer bufferbuilder, float x0, float x1, float y0, float y1, net.neoforged.fml.earlydisplay.ColourScheme.Colour colour, float fade)
-