MinecraftClient.openScreen -> setScreen (#2526)

* MinecraftClient.openScreen -> setScreen

Closes #1597.

* Fix javadoc error in Item.Settings

* 'currently opened' -> 'previous'

* Improve jd

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Juuxel 2021-07-10 14:27:09 +03:00 committed by GitHub
parent 3299249a97
commit 1eee701121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 8 deletions

View File

@ -116,9 +116,9 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
FIELD field_1755 currentScreen Lnet/minecraft/class_437;
COMMENT The Minecraft client's currently open screen.
COMMENT This field should only be used to get the current screen.
COMMENT For changing the screen use {@link MinecraftClient#openScreen(Screen)}
COMMENT For changing the screen, use {@link MinecraftClient#setScreen(Screen)}.
COMMENT
COMMENT @see MinecraftClient#openScreen(Screen)
COMMENT @see MinecraftClient#setScreen(Screen)
FIELD field_1756 blockRenderManager Lnet/minecraft/class_776;
FIELD field_1757 resourcePackDir Ljava/io/File;
FIELD field_1758 tutorialManager Lnet/minecraft/class_1156;
@ -200,13 +200,19 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
METHOD method_1506 handleGlErrorByDisableVsync (IJ)V
ARG 1 error
ARG 2 description
METHOD method_1507 openScreen (Lnet/minecraft/class_437;)V
COMMENT Opens a new screen, changing the current screen if needed.
METHOD method_1507 setScreen (Lnet/minecraft/class_437;)V
COMMENT Sets the current screen to a new screen.
COMMENT
COMMENT <p>If the screen being opened is {@code null} and the client is not in game, the title screen will be opened.
COMMENT If the currently opened screen is {@code null} and player is dead then the death screen will be opened.
COMMENT Otherwise the currently open screen will be closed.
COMMENT <p>If the screen being opened is {@code null}:
COMMENT <ul>
COMMENT <li>if the client is not in game, the title screen will be opened</li>
COMMENT <li>if the {@linkplain #player} is dead, the death screen will be opened</li>
COMMENT </ul>
COMMENT
COMMENT <p>If there is an open screen when the current screen is changed, {@link Screen#removed()}
COMMENT will be called on it to notify it of the closing.
ARG 1 screen
COMMENT the new screen, or {@code null} to just close the previous screen
METHOD method_1508 handleInputEvents ()V
METHOD method_1511 doItemPick ()V
METHOD method_1513 reloadResourcesConcurrently ()Ljava/util/concurrent/CompletableFuture;

View File

@ -81,7 +81,7 @@ CLASS net/minecraft/class_437 net/minecraft/client/gui/screen/Screen
METHOD method_25426 init ()V
COMMENT Called when a screen should be initialized.
COMMENT
COMMENT <p>This method is called when this screen is {@linkplain net.minecraft.client.MinecraftClient#openScreen(Screen) opened} or resized.
COMMENT <p>This method is called when this screen is {@linkplain net.minecraft.client.MinecraftClient#setScreen(Screen) opened} or resized.
METHOD method_25427 sendMessage (Ljava/lang/String;)V
ARG 1 message
METHOD method_25428 confirmLink (Z)V