From b99cf7dda742758aea680822f57fccbfbaf6f117 Mon Sep 17 00:00:00 2001 From: i509VCB Date: Thu, 17 Dec 2020 03:07:15 -0600 Subject: [PATCH] Some client javadoc (#1916) * Some client javadoc * Apply suggestions from code review Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: YanisBft Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> Co-authored-by: YanisBft --- .../minecraft/client/MinecraftClient.mapping | 56 ++++++++++++++++++- .../client/gui/screen/ConnectScreen.mapping | 6 ++ .../client/gui/screen/DeathScreen.mapping | 1 + 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/mappings/net/minecraft/client/MinecraftClient.mapping b/mappings/net/minecraft/client/MinecraftClient.mapping index 72677db9aa..091c86d285 100644 --- a/mappings/net/minecraft/client/MinecraftClient.mapping +++ b/mappings/net/minecraft/client/MinecraftClient.mapping @@ -1,4 +1,43 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient + COMMENT Represents a logical Minecraft client. + COMMENT The logical Minecraft client is responsible for rendering, sound playback and control input. + COMMENT The Minecraft client also manages connections to a logical server which may be the client's {@link net.minecraft.server.integrated.IntegratedServer} or a remote server. + COMMENT The Minecraft client instance may be obtained using {@link MinecraftClient#getInstance()}. + COMMENT + COMMENT

Rendering on a Minecraft client is split into several facilities. + COMMENT The primary entrypoint for rendering is {@link net.minecraft.client.render.GameRenderer#render(float, long, boolean)}. + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT
Thing to render Rendering facility
World {@link net.minecraft.client.render.WorldRenderer}
Blocks and Fluids {@link net.minecraft.client.render.block.BlockRenderManager}
Entities {@link net.minecraft.client.render.entity.EntityRenderDispatcher}
Block entities {@link net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher}
Items {@link net.minecraft.client.render.item.ItemRenderer}
Items held in hand {@link net.minecraft.client.render.item.HeldItemRenderer}
Text {@link net.minecraft.client.font.TextRenderer}
Game hud (health bar, hunger bar) {@link net.minecraft.client.gui.hud.InGameHud}
+ COMMENT + COMMENT @see net.minecraft.server.integrated.IntegratedServer + COMMENT @see net.minecraft.client.render.GameRenderer FIELD field_16240 profiler Lnet/minecraft/class_3695; FIELD field_16762 game Lnet/minecraft/class_3799; FIELD field_1686 windowProvider Lnet/minecraft/class_3682; @@ -61,7 +100,11 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient FIELD field_1743 skipGameRender Z FIELD field_1744 connectedToRealms Z FIELD field_1745 resourceManager Lnet/minecraft/class_3296; - FIELD field_1746 connection Lnet/minecraft/class_2535; + FIELD field_1746 integratedServerConnection Lnet/minecraft/class_2535; + COMMENT The client connection to the integrated server. + COMMENT This is only used when connecting to the integrated server. + COMMENT + COMMENT @see net.minecraft.client.gui.screen.ConnectScreen FIELD field_1747 crashReport Lnet/minecraft/class_128; FIELD field_1748 levelStorage Lnet/minecraft/class_32; FIELD field_1749 ALT_TEXT_RENDERER_ID Lnet/minecraft/class_2960; @@ -69,6 +112,11 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient FIELD field_1751 blockColors Lnet/minecraft/class_324; FIELD field_1752 itemUseCooldown I 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 + COMMENT @see MinecraftClient#openScreen(Screen) FIELD field_1756 blockRenderManager Lnet/minecraft/class_776; FIELD field_1757 resourcePackDir Ljava/io/File; FIELD field_1758 tutorialManager Lnet/minecraft/class_1156; @@ -142,6 +190,11 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient 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. + COMMENT + COMMENT

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. ARG 1 screen METHOD method_1508 handleInputEvents ()V METHOD method_1511 doItemPick ()V @@ -303,6 +356,7 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient METHOD method_29611 isFabulousGraphicsOrBetter ()Z METHOD method_30049 getVideoWarningManager ()Lnet/minecraft/class_5407; METHOD method_31320 getSocialInteractionsManager ()Lnet/minecraft/class_5520; + METHOD method_31321 isConnectedToServer ()Z METHOD method_31974 getEntityModelLoader ()Lnet/minecraft/class_5599; CLASS class_5366 WorldLoadAction CLASS class_5367 IntegratedResourceManager diff --git a/mappings/net/minecraft/client/gui/screen/ConnectScreen.mapping b/mappings/net/minecraft/client/gui/screen/ConnectScreen.mapping index 2d79c54a0b..fd2cfee2eb 100644 --- a/mappings/net/minecraft/client/gui/screen/ConnectScreen.mapping +++ b/mappings/net/minecraft/client/gui/screen/ConnectScreen.mapping @@ -1,9 +1,15 @@ CLASS net/minecraft/class_412 net/minecraft/client/gui/screen/ConnectScreen + COMMENT The connection screen is used to initiate a connection to a remote server. + COMMENT This is only used when connecting over LAN or to a remote dedicated server. FIELD field_19097 narratorTimer J FIELD field_2408 CONNECTOR_THREADS_COUNT Ljava/util/concurrent/atomic/AtomicInteger; FIELD field_2409 connectingCancelled Z FIELD field_2410 LOGGER Lorg/apache/logging/log4j/Logger; FIELD field_2411 connection Lnet/minecraft/class_2535; + COMMENT The client connection to the remote server. + COMMENT This is not used when connecting to the client's own integrated server. + COMMENT + COMMENT @see net.minecraft.client.MinecraftClient#integratedServerConnection FIELD field_2412 parent Lnet/minecraft/class_437; FIELD field_2413 status Lnet/minecraft/class_2561; METHOD (Lnet/minecraft/class_437;Lnet/minecraft/class_310;Ljava/lang/String;I)V diff --git a/mappings/net/minecraft/client/gui/screen/DeathScreen.mapping b/mappings/net/minecraft/client/gui/screen/DeathScreen.mapping index 29c3b2822c..97e9f2f781 100644 --- a/mappings/net/minecraft/client/gui/screen/DeathScreen.mapping +++ b/mappings/net/minecraft/client/gui/screen/DeathScreen.mapping @@ -2,6 +2,7 @@ CLASS net/minecraft/class_418 net/minecraft/client/gui/screen/DeathScreen FIELD field_18974 isHardcore Z FIELD field_2450 message Lnet/minecraft/class_2561; FIELD field_2451 ticksSinceDeath I + FIELD field_26537 score Lnet/minecraft/class_2561; METHOD (Lnet/minecraft/class_2561;Z)V ARG 1 message ARG 2 isHardcore