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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float
private final net.neoforged.fml.earlydisplay.DisplayWindow
private long
static final ResourceLocation
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, MOJANG_STUDIOS_LOGO_LOCATION
-
Constructor Summary
ConstructorsConstructorDescriptionNeoForgeLoadingOverlay
(Minecraft mc, ReloadInstance reloader, Consumer<Optional<Throwable>> errorConsumer, net.neoforged.fml.earlydisplay.DisplayWindow displayWindow) -
Method Summary
Modifier and TypeMethodDescriptionvoid
render
(GuiGraphics graphics, int mouseX, int mouseY, float partialTick) Renders the graphical user interface (GUI) element.Methods inherited from class net.minecraft.client.gui.screens.LoadingOverlay
isPauseScreen, registerTextures
-
Field Details
-
LOADING_OVERLAY_TEXTURE_ID
-
minecraft
-
reload
-
onFinish
-
displayWindow
private final net.neoforged.fml.earlydisplay.DisplayWindow displayWindow -
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
-
render
Description copied from class:LoadingOverlay
Renders the graphical user interface (GUI) element.- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classLoadingOverlay
- Parameters:
graphics
- the GuiGraphics object used for rendering.mouseX
- the x-coordinate of the mouse cursor.mouseY
- the y-coordinate of the mouse cursor.partialTick
- the partial tick time.
-