Class ForgeLoadingOverlay
java.lang.Object
net.minecraft.client.gui.screens.Overlay
net.minecraft.client.gui.screens.LoadingOverlay
net.minecraftforge.client.loading.ForgeLoadingOverlay
- 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 final DisplayWindow
private long
private final Minecraft
private final ProgressMeter
private final ReloadInstance
Fields inherited from class net.minecraft.client.gui.screens.LoadingOverlay
FADE_IN_TIME, FADE_OUT_TIME
-
Constructor Summary
ConstructorDescriptionForgeLoadingOverlay
(Minecraft mc, ReloadInstance reloader, Consumer<Optional<Throwable>> errorConsumer, DisplayWindow displayWindow) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addQuad
(BufferVertexConsumer bufferbuilder, float x0, float x1, float y0, float y1, ColourScheme.Colour colour, float fade) static Supplier
<LoadingOverlay> newInstance
(Supplier<Minecraft> mc, Supplier<ReloadInstance> ri, Consumer<Optional<Throwable>> handler, DisplayWindow window) void
render
(@NotNull 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
-
progress
-
fadeOutStart
private long fadeOutStart
-
-
Constructor Details
-
ForgeLoadingOverlay
public ForgeLoadingOverlay(Minecraft mc, ReloadInstance reloader, Consumer<Optional<Throwable>> errorConsumer, DisplayWindow displayWindow)
-
-
Method Details
-
newInstance
public static Supplier<LoadingOverlay> newInstance(Supplier<Minecraft> mc, Supplier<ReloadInstance> ri, Consumer<Optional<Throwable>> handler, DisplayWindow window) -
render
public void render(@NotNull @NotNull GuiGraphics graphics, int mouseX, int mouseY, float partialTick) - Specified by:
render
in interfaceRenderable
- Overrides:
render
in classLoadingOverlay
-
addQuad
private static void addQuad(BufferVertexConsumer bufferbuilder, float x0, float x1, float y0, float y1, ColourScheme.Colour colour, float fade)
-