1.19-pre1 networking (#3164)

* 1.19-pre1 networking

* More networking stuff

* Map PacketByteBuf

* Do not use 'out of order'

* Fix typo in javadoc

* Fix javadoc

* Rename chatPreviewEnabledByServer

* Rename references to Only Show Secure Chat

* Fix typo

* Use timestamp, not time

* Final bits

* Fix #3181
This commit is contained in:
apple502j 2022-05-23 21:07:30 +09:00 committed by GitHub
parent 03ab4265d3
commit 10c797dce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 516 additions and 79 deletions

View File

@ -32,4 +32,6 @@ CLASS net/minecraft/class_2631 net/minecraft/block/entity/SkullBlockEntity
METHOD method_37469 (Ljava/util/function/Consumer;Lcom/mojang/authlib/GameProfile;)V
ARG 1 profile
METHOD method_39765 setServices (Lnet/minecraft/class_7497;Ljava/util/concurrent/Executor;)V
ARG 0 apiServices
ARG 1 executor
METHOD method_39766 clearServices ()V

View File

@ -1,18 +0,0 @@
CLASS net/minecraft/class_7516
CLASS class_7480 Query
COMMENT A query, or a request, to the server to send the chat message preview.
FIELD comp_825 message Ljava/lang/String;
COMMENT the queried message to preview
METHOD comp_825 message ()Ljava/lang/String;
METHOD method_44043 idEquals (I)Z
ARG 1 id
METHOD method_44044 messageEquals (Ljava/lang/String;)Z
COMMENT {@return whether the query's queried message equals {@code message}}
ARG 1 message
CLASS class_7482 IdIncrementor
COMMENT A utility class that increments the ID by a random number from 0 to 99.
FIELD field_39335 MAX_INCREMENT I
FIELD field_39336 random Lnet/minecraft/class_5819;
FIELD field_39337 current I
METHOD method_44046 next ()I
COMMENT {@return the next ID}

View File

@ -173,6 +173,8 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
FIELD field_37857 currentGlTimerQuery Lnet/minecraft/class_7168$class_7169;
FIELD field_39068 profileKeys Lnet/minecraft/class_7434;
FIELD field_39317 realms32BitWarningChecker Lnet/minecraft/class_7478;
FIELD field_39420 authenticationService Lcom/mojang/authlib/yggdrasil/YggdrasilAuthenticationService;
FIELD field_39421 servicesSignatureVerifier Lnet/minecraft/class_7500;
METHOD <init> (Lnet/minecraft/class_542;)V
ARG 1 args
METHOD method_1476 checkIs64Bit ()Z
@ -376,6 +378,8 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
COMMENT them.
ARG 1 sender
METHOD method_29043 isMultiplayerEnabled ()Z
METHOD method_29603 (Lnet/minecraft/class_32$class_5143;Lnet/minecraft/class_3283;Lnet/minecraft/class_6904;Lnet/minecraft/class_7497;Ljava/lang/Thread;)Lnet/minecraft/class_1132;
ARG 5 thread
METHOD method_29610 startIntegratedServer (Ljava/lang/String;Lnet/minecraft/class_32$class_5143;Lnet/minecraft/class_3283;Lnet/minecraft/class_6904;)V
ARG 1 levelName
ARG 2 session
@ -482,6 +486,7 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
METHOD method_43765 (Lnet/minecraft/class_2561;)Ljava/lang/String;
ARG 0 text
METHOD method_44024 getRealms32BitWarningChecker ()Lnet/minecraft/class_7478;
METHOD method_44256 getServicesSignatureVerifier ()Lnet/minecraft/class_7500;
CLASS class_5859 ChatRestriction
COMMENT Represents the restrictions on chat on a Minecraft client.
COMMENT

View File

@ -16,6 +16,7 @@ CLASS net/minecraft/class_338 net/minecraft/client/gui/hud/ChatHud
METHOD <init> (Lnet/minecraft/class_310;)V
ARG 1 client
METHOD method_1802 scroll (I)V
ARG 1 scroll
METHOD method_1803 addToMessageHistory (Ljava/lang/String;)V
ARG 1 message
METHOD method_1804 addMessage (Lnet/minecraft/class_2561;I)V

View File

@ -60,3 +60,9 @@ CLASS net/minecraft/class_408 net/minecraft/client/gui/screen/ChatScreen
METHOD method_44062 getPreviewText ()Ljava/util/List;
METHOD method_44063 getPreviewWidth ()I
METHOD method_44064 getPreviewBottom ()I
METHOD method_44279 tryRequestPreview (Ljava/lang/String;)V
ARG 1 chatText
METHOD method_44280 tryRequestChatPreview (Ljava/lang/String;)V
ARG 1 chatText
METHOD method_44281 tryRequestCommandPreview (Ljava/lang/String;)V
ARG 1 chatText

View File

@ -71,6 +71,12 @@ CLASS net/minecraft/class_4717 net/minecraft/client/gui/screen/CommandSuggestor
ARG 1 suggestions
METHOD method_30505 formatException (Lcom/mojang/brigadier/exceptions/CommandSyntaxException;)Lnet/minecraft/class_5481;
ARG 0 exception
METHOD method_44277 getNodeAt (I)Lcom/mojang/brigadier/tree/CommandNode;
COMMENT {@return the command node at {@code cursor}}
ARG 1 cursor
METHOD method_44278 getNodeAt (ILcom/mojang/brigadier/context/CommandContextBuilder;)Lcom/mojang/brigadier/tree/CommandNode;
ARG 0 cursor
ARG 1 builder
CLASS class_464 SuggestionWindow
FIELD field_21630 lastNarrationIndex I
FIELD field_25709 suggestions Ljava/util/List;

View File

@ -4,6 +4,10 @@ CLASS net/minecraft/class_7483 net/minecraft/client/gui/screen/multiplayer/ChatP
FIELD field_39350 CHECK_MESSAGE Lnet/minecraft/class_2561;
FIELD field_39351 NARRATED_TEXT Lnet/minecraft/class_2561;
FIELD field_39352 serverInfo Lnet/minecraft/class_642;
FIELD field_39433 parent Lnet/minecraft/class_437;
METHOD <init> (Lnet/minecraft/class_437;Lnet/minecraft/class_642;)V
ARG 1 parent
ARG 2 serverInfo
METHOD method_44066 (Lnet/minecraft/class_4185;)V
ARG 1 button
METHOD method_44067 (Lnet/minecraft/class_4185;)V

View File

@ -0,0 +1,69 @@
CLASS net/minecraft/class_7516 net/minecraft/client/network/ChatPreviewRequester
COMMENT Chat preview requester requests the server to preview a message.
COMMENT
COMMENT <p>A <strong>query</strong> is a request to the server to send the chat message preview.
COMMENT The previewer only sends the query if there is no query that is waiting for the response,
COMMENT or if the last query took more than {@value #LATEST_NEXT_QUERY_DELAY} milliseconds to
COMMENT respond. A query can be sent at most every {@value #EARLIEST_NEXT_QUERY_DELAY} milliseconds.
COMMENT
COMMENT @see ChatPreviewer
FIELD field_39423 EARLIEST_NEXT_QUERY_DELAY J
COMMENT How long the previewer should wait at a minimum before sending the next
COMMENT query in milliseconds. Is {@value}.
FIELD field_39424 LATEST_NEXT_QUERY_DELAY J
COMMENT How long the previewer can wait for the response at most before sending the next
COMMENT query in milliseconds. Is {@value}.
FIELD field_39425 client Lnet/minecraft/class_310;
FIELD field_39426 idIncrementor Lnet/minecraft/class_7516$class_7482;
FIELD field_39427 pendingResponseQuery Lnet/minecraft/class_7516$class_7480;
COMMENT The query that is waiting for the server to respond (i.e. the last query).
COMMENT Can be {@code null} if there is no such query.
FIELD field_39428 queryTime J
COMMENT The last time a query was sent.
COMMENT
COMMENT <p>The next query will be sent after {@value #EARLIEST_NEXT_QUERY_DELAY} to
COMMENT {@value #LATEST_NEXT_QUERY_DELAY} milliseconds; the actual delay depends on
COMMENT when the server responds to the query.
METHOD <init> (Lnet/minecraft/class_310;)V
ARG 1 client
METHOD method_44269 clear ()V
METHOD method_44270 handleResponse (I)Ljava/lang/String;
COMMENT {@return the response's original queried message, or {@code null} if the response
COMMENT is not for {@linkplain #pendingResponseQuery the current pending request}}
COMMENT
COMMENT <p>If the response is valid, this will also clear {@link #pendingResponseQuery}.
ARG 1 id
METHOD method_44271 shouldRequest (J)Z
COMMENT {@return whether the delay for querying has passed}
COMMENT
COMMENT <p>The previewer only sends the query if there is no query that is waiting for the response,
COMMENT or if the last query took more than {@value #LATEST_NEXT_QUERY_DELAY} milliseconds to
COMMENT respond. A query can be sent at most every {@value #EARLIEST_NEXT_QUERY_DELAY} milliseconds.
ARG 1 currentTime
METHOD method_44272 tryRequest (Ljava/lang/String;J)Z
COMMENT Sends the request to preview {@code message}, if there isn't already one and
COMMENT if the delay has passed.
COMMENT
COMMENT @return {@code false} if the request could not be sent due to the delay, otherwise
COMMENT {@code true}
ARG 1 message
ARG 2 currentTime
METHOD method_44273 hasPendingResponseQuery ()Z
COMMENT {@return whether the requester has a query that is waiting for the server to respond}
CLASS class_7480 Query
COMMENT A query, or a request, to the server to send the chat message preview.
FIELD comp_825 message Ljava/lang/String;
COMMENT the queried message to preview
METHOD comp_825 message ()Ljava/lang/String;
METHOD method_44043 idEquals (I)Z
ARG 1 id
METHOD method_44044 messageEquals (Ljava/lang/String;)Z
COMMENT {@return whether the query's queried message equals {@code message}}
ARG 1 message
CLASS class_7482 IdIncrementor
COMMENT A utility class that increments the ID by a random number from 0 to 99.
FIELD field_39335 MAX_INCREMENT I
FIELD field_39336 random Lnet/minecraft/class_5819;
FIELD field_39337 current I
METHOD method_44046 next ()I
COMMENT {@return the next ID}

View File

@ -1,12 +1,8 @@
CLASS net/minecraft/class_7479 net/minecraft/client/network/ChatPreviewer
COMMENT Chat previewer manages the chat preview. Chat previewer is created per
COMMENT {@link net.minecraft.client.gui.screen.ChatScreen}, so closing the chat screen and
COMMENT reopening it would create a new chat previewer.
COMMENT
COMMENT <p>A <strong>query</strong> is a request to the server to send the chat message preview.
COMMENT The previewer only sends the query if there is no query that is waiting for the response,
COMMENT or if the last query took more than {@value #LATEST_NEXT_QUERY_DELAY} milliseconds to
COMMENT respond. A query can be sent at most every {@value #EARLIEST_NEXT_QUERY_DELAY} milliseconds.
COMMENT reopening it would create a new chat previewer. {@link ChatPreviewRequester}
COMMENT handles the actual requesting.
COMMENT
COMMENT <p>The response to the query can be "consumed" by calling {@link #tryConsumeResponse}.
COMMENT If the response is still valid (i.e. the input has not changed since the query was sent),
@ -21,19 +17,27 @@ CLASS net/minecraft/class_7479 net/minecraft/client/network/ChatPreviewer
COMMENT
COMMENT @see #tryConsumeResponse
FIELD field_39334 lastResponse Lnet/minecraft/class_7479$class_7481;
FIELD field_39429 shouldRenderPreview Z
FIELD field_39430 lastPreviewedMessage Ljava/lang/String;
FIELD field_39431 pendingRequestMessage Ljava/lang/String;
COMMENT The message that is waiting for the previewer to request (i.e. the next query to be sent).
COMMENT Can be {@code null} if there is no such query.
COMMENT
COMMENT @implNote If the message is sent instantly, this field is not set.
FIELD field_39432 requester Lnet/minecraft/class_7516;
METHOD <init> (Lnet/minecraft/class_310;)V
ARG 1 client
METHOD method_44031 tryQuery ()V
COMMENT Sends the pending query, if it exists and the delay has passed.
METHOD method_44031 tryRequestPending ()V
COMMENT Sends the message that was waiting for its request delay to pass, if it is able to.
METHOD method_44032 onResponse (ILnet/minecraft/class_2561;)V
COMMENT Called when the preview response was received.
COMMENT
COMMENT @implNote This sets the last response and clears {@link #pendingResponseQuery}
COMMENT if the pending query ID equals {@code id}
COMMENT @implNote This sets the last response if the requester {@linkplain
COMMENT ChatPreviewRequester#handleResponse successfully handled} the response.
ARG 1 id
ARG 2 response
METHOD method_44036 clear ()V
COMMENT Clears the last response and the queries (but not the query time).
COMMENT Clears the last response and the requester's state.
METHOD method_44037 tryConsumeResponse (Ljava/lang/String;)Lnet/minecraft/class_2561;
COMMENT {@return the consumed response text, or {@code null} if the server responded as such, or
COMMENT if the response could not be consumed}
@ -58,6 +62,15 @@ CLASS net/minecraft/class_7479 net/minecraft/client/network/ChatPreviewer
COMMENT
COMMENT @implNote A preview should be rendered if there is a response, a pending query, or
COMMENT a query waiting for the response.
METHOD method_44274 tryRequest (Ljava/lang/String;)V
COMMENT Tries to send the request to preview {@code message}. If the delay has passed,
COMMENT it will send instantly; otherwise, it will set {@link #pendingRequestMessage} which
COMMENT can be requested by calling {@link #tryRequestPending()}.
ARG 1 message
METHOD method_44275 disablePreview ()V
COMMENT Sets {@link #shouldRenderPreview} to {@code false} and clears this previewer.
METHOD method_44276 tryRequestInternal (Ljava/lang/String;)V
ARG 1 message
CLASS class_7481 Response
COMMENT A response to the preview query.
FIELD comp_827 Ljava/lang/String;

View File

@ -18,3 +18,5 @@ CLASS net/minecraft/class_635 net/minecraft/client/network/ClientLoginNetworkHan
ARG 2 packet
ARG 3 decryptionCipher
ARG 4 encryptionCipher
METHOD method_44285 ([BJLnet/minecraft/class_7498$class_7499;)V
ARG 3 updater

View File

@ -120,6 +120,8 @@ CLASS net/minecraft/class_746 net/minecraft/client/network/ClientPlayerEntity
COMMENT arguments to sign, this will return {@link ArgumentSignatureDataMap#empty()}.
ARG 1 signer
ARG 2 parseResults
ARG 3 preview
COMMENT the previewed argument value; if supplied, will be used for all signed arguments
METHOD method_43787 sendCommand (Lnet/minecraft/class_7470;Ljava/lang/String;Lnet/minecraft/class_2561;)V
COMMENT Signs and sends {@code command} to the server.
ARG 1 signer
@ -154,5 +156,8 @@ CLASS net/minecraft/class_746 net/minecraft/client/network/ClientPlayerEntity
COMMENT Sends a command to the server.
ARG 1 command
COMMENT the command (can have the leading slash)
METHOD method_44297 (Lnet/minecraft/class_2561;Lnet/minecraft/class_7470;Lnet/minecraft/class_7501;Lcom/google/common/collect/ImmutableMap$Builder;Ljava/lang/String;Lnet/minecraft/class_2561;)V
ARG 4 argumentName
ARG 5 value
METHOD method_7290 dropSelectedItem (Z)Z
ARG 1 entireStack

View File

@ -15,6 +15,7 @@ CLASS net/minecraft/class_640 net/minecraft/client/network/PlayerListEntry
FIELD field_39073 publicKeyData Lnet/minecraft/class_7428;
METHOD <init> (Lnet/minecraft/class_2703$class_2705;Lnet/minecraft/class_7500;)V
ARG 1 playerListPacketEntry
ARG 2 servicesSignatureVerifier
METHOD method_2955 getScoreboardTeam ()Lnet/minecraft/class_268;
METHOD method_2956 (Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;Lnet/minecraft/class_2960;Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;)V
ARG 1 type

View File

@ -1,7 +1,12 @@
CLASS net/minecraft/class_642 net/minecraft/client/network/ServerInfo
COMMENT The information of a server entry in the list of servers available in
COMMENT the multiplayer screen from the menu. The list of these servers is
COMMENT stored in the {@code servers.dat} file within the client game directory.
COMMENT the multiplayer screen, or that of the servers connected directly.
COMMENT The information for directly-connected servers are also saved (although
COMMENT hidden from the multiplayer screen) so that chat preview acknowledgements
COMMENT and other settings are saved. The list of these servers is stored in the
COMMENT {@code servers.dat} file within the client game directory.
COMMENT
COMMENT @see net.minecraft.client.option.ServerList
FIELD field_3752 name Ljava/lang/String;
FIELD field_3753 playerCountLabel Lnet/minecraft/class_2561;
FIELD field_3754 online Z
@ -16,7 +21,9 @@ CLASS net/minecraft/class_642 net/minecraft/client/network/ServerInfo
FIELD field_3763 local Z
FIELD field_39355 LOGGER Lorg/slf4j/Logger;
FIELD field_39356 chatPreview Lnet/minecraft/class_642$class_7484;
FIELD field_39436 temporaryChatPreviewState Z
METHOD <init> (Ljava/lang/String;Ljava/lang/String;Z)V
ARG 1 name
ARG 2 address
ARG 3 local
METHOD method_2989 setIcon (Ljava/lang/String;)V
@ -34,7 +41,7 @@ CLASS net/minecraft/class_642 net/minecraft/client/network/ServerInfo
COMMENT <p>This is called when a user has responded to the prompt on whether to
COMMENT accept server resource packs from this server in the future.
ARG 1 resourcePackPolicy
METHOD method_2996 copyFrom (Lnet/minecraft/class_642;)V
METHOD method_2996 copyWithSettingsFrom (Lnet/minecraft/class_642;)V
ARG 1 serverInfo
METHOD method_44077 (Lnet/minecraft/class_642;Lnet/minecraft/class_642$class_7484;)V
ARG 1 chatPreview
@ -43,10 +50,17 @@ CLASS net/minecraft/class_642 net/minecraft/client/network/ServerInfo
METHOD method_44079 (Lnet/minecraft/class_2487;Lnet/minecraft/class_2520;)V
ARG 1 chatPreview
METHOD method_44080 setPreviewsChat (Z)V
COMMENT Sets whether the chat preview is enabled.
COMMENT Sets whether the chat preview is enabled. This affects the saved server info;
COMMENT to disable the chat preview temporarily use {@link #setTemporaryChatPreviewState}.
ARG 1 enabled
METHOD method_44081 getChatPreview ()Lnet/minecraft/class_642$class_7484;
METHOD method_44082 shouldPreviewChat ()Z
METHOD method_44292 copyFrom (Lnet/minecraft/class_642;)V
ARG 1 serverInfo
METHOD method_44293 setTemporaryChatPreviewState (Z)V
COMMENT Sets the temporary chat preview state. Unlike {@link #setPreviewsChat}, this
COMMENT does not affect the saved server info.
ARG 1 temporaryChatPreviewState
CLASS class_643 ResourcePackPolicy
COMMENT The policy of the client when this server sends a {@linkplain
COMMENT net.minecraft.network.packet.s2c.play.ResourcePackSendS2CPacket server

View File

@ -207,8 +207,8 @@ CLASS net/minecraft/class_315 net/minecraft/client/option/GameOptions
FIELD field_38300 MAX_FRAMERATE I
FIELD field_39318 CHAT_PREVIEW_TOOLTIP Lnet/minecraft/class_2561;
FIELD field_39319 chatPreview Lnet/minecraft/class_7172;
FIELD field_39320 ONLY_SHOW_SIGNED_CHAT_TOOLTIP Lnet/minecraft/class_2561;
FIELD field_39321 onlyShowSignedChat Lnet/minecraft/class_7172;
FIELD field_39320 ONLY_SHOW_SECURE_CHAT_TOOLTIP Lnet/minecraft/class_2561;
FIELD field_39321 onlyShowSecureChat Lnet/minecraft/class_7172;
METHOD <init> (Lnet/minecraft/class_310;Ljava/io/File;)V
ARG 1 client
ARG 2 optionsFile
@ -562,7 +562,7 @@ CLASS net/minecraft/class_315 net/minecraft/client/option/GameOptions
ARG 0 optionText
ARG 1 value
METHOD method_44025 getChatPreview ()Lnet/minecraft/class_7172;
METHOD method_44026 getOnlyShowSignedChat ()Lnet/minecraft/class_7172;
METHOD method_44026 getOnlyShowSecureChat ()Lnet/minecraft/class_7172;
CLASS 2
METHOD method_33676 find (Ljava/lang/String;)Ljava/lang/String;
ARG 1 key

View File

@ -1,8 +1,16 @@
CLASS net/minecraft/class_641 net/minecraft/client/option/ServerList
COMMENT A list of {@link ServerInfo}. The list can contain an unlimited amount of
COMMENT {@linkplain #servers server entries that are displayed on the multiplayer screen},
COMMENT and up to {@value #MAX_HIDDEN_ENTRIES} {@linkplain #hiddenServers entries of servers}
COMMENT that are created when using "Direct Connection" and is hidden from the screen.
FIELD field_3749 servers Ljava/util/List;
FIELD field_3750 client Lnet/minecraft/class_310;
FIELD field_3751 LOGGER Lorg/slf4j/Logger;
FIELD field_39360 IO_EXECUTOR Lnet/minecraft/class_3846;
FIELD field_39437 MAX_HIDDEN_ENTRIES I
FIELD field_39438 hiddenServers Ljava/util/List;
METHOD <init> (Lnet/minecraft/class_310;)V
ARG 1 client
METHOD method_2980 set (ILnet/minecraft/class_642;)V
ARG 1 index
ARG 2 serverInfo
@ -16,7 +24,27 @@ CLASS net/minecraft/class_641 net/minecraft/client/option/ServerList
ARG 1 index1
ARG 2 index2
METHOD method_2986 updateServerListEntry (Lnet/minecraft/class_642;)V
ARG 0 e
ARG 0 serverInfo
METHOD method_2987 saveFile ()V
METHOD method_2988 add (Lnet/minecraft/class_642;Z)V
COMMENT Adds a server info to this list.
ARG 1 serverInfo
ARG 2 hidden
COMMENT whether the info should not be listed in the multiplayer screen (also called
COMMENT "direct connection")
METHOD method_44294 replace (Lnet/minecraft/class_642;Ljava/util/List;)Z
COMMENT Replaces the server info in {@code serverInfos} whose name and address match
COMMENT {@code serverInfo}'s with {@code serverInfo}.
ARG 0 serverInfo
ARG 1 serverInfos
METHOD method_44295 get (Ljava/lang/String;)Lnet/minecraft/class_642;
COMMENT {@return the server info for {@code address}, or {@code null} if there is no such one}
ARG 1 address
METHOD method_44296 tryUnhide (Ljava/lang/String;)Lnet/minecraft/class_642;
COMMENT {@return the previously hidden server info for the address {@code address}, or
COMMENT {@code null} if there is no such info}
COMMENT
COMMENT <p>This "unhides" the server info and is used when adding the entry to the
COMMENT multiplayer screen to unhide any existing server info created when connecting
COMMENT directly.
ARG 1 address

View File

@ -3,7 +3,10 @@ CLASS net/minecraft/class_7434 net/minecraft/client/util/ProfileKeys
FIELD field_39074 LOGGER Lorg/slf4j/Logger;
FIELD field_39075 PROFILE_KEYS_PATH Ljava/nio/file/Path;
FIELD field_39076 jsonPath Ljava/nio/file/Path;
FIELD field_39434 publicKeyFuture Ljava/util/concurrent/CompletableFuture;
FIELD field_39435 signerFuture Ljava/util/concurrent/CompletableFuture;
METHOD <init> (Lcom/mojang/authlib/minecraft/UserApiService;Ljava/util/UUID;Ljava/nio/file/Path;)V
ARG 1 userApiService
ARG 2 uuid
ARG 3 root
METHOD method_43600 saveKeyPairToFile (Lnet/minecraft/class_7427;)V
@ -38,3 +41,11 @@ CLASS net/minecraft/class_7434 net/minecraft/client/util/ProfileKeys
COMMENT
COMMENT @throws NetworkEncryptionException when the response is malformed
ARG 0 keyPairResponse
METHOD method_44287 getSigner ()Lnet/minecraft/class_7501;
COMMENT {@return the signer, or {@code null} if there is no key pair associated with the profile}
METHOD method_44288 (Ljava/util/Optional;)Ljava/util/Optional;
ARG 0 optionalKeyPair
METHOD method_44289 (Ljava/util/Optional;)Ljava/util/Optional;
ARG 0 optionalKeyPair
METHOD method_44290 (Lnet/minecraft/class_7427;)Lnet/minecraft/class_7501;
ARG 0 keyPair

View File

@ -0,0 +1,13 @@
CLASS net/minecraft/class_7517 net/minecraft/command/argument/DecoratableArgumentType
METHOD method_44258 decorate (Lnet/minecraft/class_2168;Ljava/lang/Object;)Ljava/util/concurrent/CompletableFuture;
ARG 1 source
ARG 2 format
METHOD method_44261 getFormatClass ()Ljava/lang/Class;
METHOD method_44282 decorate (Lcom/mojang/brigadier/context/CommandContextBuilder;Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
ARG 1 builder
ARG 2 argumentName
METHOD method_44283 decorate (Lcom/mojang/brigadier/tree/ArgumentCommandNode;Lcom/mojang/brigadier/context/CommandContextBuilder;)Ljava/util/concurrent/CompletableFuture;
ARG 0 node
ARG 1 builder
METHOD method_44284 isDecoratableArgumentNode (Lcom/mojang/brigadier/tree/CommandNode;)Z
ARG 0 node

View File

@ -1,8 +1,14 @@
CLASS net/minecraft/class_2196 net/minecraft/command/argument/MessageArgumentType
FIELD field_39422 LOGGER Lorg/slf4j/Logger;
FIELD field_9876 EXAMPLES Ljava/util/Collection;
METHOD method_43770 getSignedMessage (Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Lnet/minecraft/class_2196$class_7515;
ARG 0 context
ARG 1 name
METHOD method_44259 (Lnet/minecraft/class_2168;Ljava/lang/Throwable;)Ljava/lang/Object;
ARG 1 throwable
METHOD method_44260 handleResolvingFailure (Lnet/minecraft/class_2168;Ljava/util/concurrent/CompletableFuture;)V
ARG 0 source
ARG 1 future
METHOD method_9339 getMessage (Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Lnet/minecraft/class_2561;
ARG 0 context
ARG 1 name
@ -17,6 +23,10 @@ CLASS net/minecraft/class_2196 net/minecraft/command/argument/MessageArgumentTyp
ARG 2 selectors
METHOD method_35691 getContents ()Ljava/lang/String;
METHOD method_35692 getSelectors ()[Lnet/minecraft/class_2196$class_2198;
METHOD method_44267 decorate (Lnet/minecraft/class_2168;)Ljava/util/concurrent/CompletableFuture;
ARG 1 source
METHOD method_44268 format (Lnet/minecraft/class_2168;)Lnet/minecraft/class_2561;
ARG 1 source
METHOD method_9341 format (Lnet/minecraft/class_2168;Z)Lnet/minecraft/class_2561;
ARG 1 source
ARG 2 canUseSelectors
@ -36,3 +46,16 @@ CLASS net/minecraft/class_2196 net/minecraft/command/argument/MessageArgumentTyp
METHOD method_9344 getEnd ()I
METHOD method_9345 format (Lnet/minecraft/class_2168;)Lnet/minecraft/class_2561;
ARG 1 source
CLASS class_7515 SignedMessage
METHOD method_44262 decorate (Lnet/minecraft/class_2168;)Ljava/util/concurrent/CompletableFuture;
ARG 1 source
METHOD method_44263 logInvalidSignatureWarning (Lnet/minecraft/class_2168;Lnet/minecraft/class_5837;)Lnet/minecraft/class_5837;
ARG 1 source
ARG 2 decorated
METHOD method_44264 filter (Lnet/minecraft/class_2168;Lnet/minecraft/class_2561;)Ljava/util/concurrent/CompletableFuture;
ARG 1 source
ARG 2 message
METHOD method_44265 (Lnet/minecraft/class_2168;Lnet/minecraft/class_5837;)Lnet/minecraft/class_5837;
ARG 2 decorated
METHOD method_44266 (Lnet/minecraft/class_2168;Lnet/minecraft/class_5837;)Ljava/util/concurrent/CompletionStage;
ARG 2 filtered

View File

@ -6,8 +6,8 @@ CLASS net/minecraft/class_7492 net/minecraft/network/ChatDecorator
COMMENT <p>For the chat decorator to produce a signed message, <strong>both the server
COMMENT and the sender's client need to have chat previews enabled</strong>, Otherwise, the decorated
COMMENT content is considered unsigned, and if the clients require chat messages to be signed
COMMENT via the {@linkplain net.minecraft.client.option.GameOptions#getOnlyShowSignedChat
COMMENT "Only Show Signed Chat" option}, they will see the undecorated message. Therefore,
COMMENT via the {@linkplain net.minecraft.client.option.GameOptions#getOnlyShowSecureChat
COMMENT "Only Show Secure Chat" option}, they will see the undecorated message. Therefore,
COMMENT chat decorator is <strong>not recommended for censoring messages</strong>.
COMMENT
COMMENT <p>It is <strong>very important that the decorator return the same text when previewed
@ -22,8 +22,35 @@ CLASS net/minecraft/class_7492 net/minecraft/network/ChatDecorator
METHOD decorate (Lnet/minecraft/class_3222;Lnet/minecraft/class_2561;)Ljava/util/concurrent/CompletableFuture;
COMMENT {@return the signed chat message with unsigned content set as decorated {@code message}}
COMMENT
COMMENT @apiNote This is used by various commands that send messages, such as {@link
COMMENT net.minecraft.server.command.MeCommand}.
COMMENT
COMMENT <p>If the received player requires signed chat message, they will see the original content.
ARG 1 sender
ARG 2 message
METHOD decorateChat (Lnet/minecraft/class_3222;Lnet/minecraft/class_5837;Lnet/minecraft/class_7469;Z)Ljava/util/concurrent/CompletableFuture;
COMMENT {@return the decorated signed chat message from undecorated {@code message}}
COMMENT
COMMENT <p>If {@code previewed} is false, the returned message will have the original
COMMENT content as signed and the decorated content as unsigned. This means that if the
COMMENT received player requires signed chat message, they will see the original content.
ARG 1 sender
ARG 2 message
ARG 3 signature
ARG 4 previewed
COMMENT whether the decoration was previewed by the sender's client
METHOD decorateFiltered (Lnet/minecraft/class_3222;Lnet/minecraft/class_5837;)Ljava/util/concurrent/CompletableFuture;
COMMENT {@return the decorated signed chat message from undecorated {@code message}}
COMMENT
COMMENT <p>If {@code previewed} is false, the returned message will have the original
COMMENT content as signed and the decorated content as unsigned. This means that if the
COMMENT received player requires signed chat message, they will see the original content.
COMMENT
COMMENT <p>If {@code message} has a filtered part, this will decorate both the raw and the
COMMENT filtered text.
ARG 1 sender
ARG 2 message
METHOD method_44303 (Lnet/minecraft/class_3222;Lnet/minecraft/class_2561;)Ljava/util/concurrent/CompletableFuture;
ARG 0 sender
ARG 1 message
METHOD method_44304 (Lnet/minecraft/class_5837;Lnet/minecraft/class_7469;ZLnet/minecraft/class_5837;)Lnet/minecraft/class_5837;
ARG 3 decorated
METHOD method_44305 (Ljava/util/concurrent/CompletableFuture;Ljava/util/concurrent/CompletableFuture;Ljava/lang/Void;)Lnet/minecraft/class_5837;
ARG 2 void_

View File

@ -1001,6 +1001,8 @@ CLASS net/minecraft/class_2540 net/minecraft/network/PacketByteBuf
COMMENT @return the read public key
COMMENT @throws io.netty.handler.codec.DecoderException if the public key is malformed
COMMENT @see #writePublicKey(PublicKey)
METHOD method_44302 toEncodedStringLength (I)I
ARG 0 decodedLength
METHOD nioBuffer (II)Ljava/nio/ByteBuffer;
ARG 1 index
ARG 2 length

View File

@ -1,6 +1,7 @@
CLASS net/minecraft/class_7450 net/minecraft/network/encryption/ArgumentSignatureDataMap
COMMENT A record holding the salt and signatures for all signable arguments of an executed command.
FIELD field_39185 MAX_ARGUMENT_NAME_LENGTH I
FIELD field_39418 MAX_ARGUMENTS I
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf
METHOD method_43745 empty ()Lnet/minecraft/class_7450;

View File

@ -7,14 +7,15 @@ CLASS net/minecraft/class_7469 net/minecraft/network/encryption/ChatMessageSigna
COMMENT {@return whether {@code message} can be verified with this signature}
COMMENT
COMMENT @throws SignatureException when verifying fails
ARG 1 verifier
ARG 2 message
COMMENT the message to verify
METHOD method_43861 verify (Lnet/minecraft/class_7500;Lnet/minecraft/class_2561;)Z
COMMENT {@return whether {@code message} can be verified with this signature}
COMMENT
COMMENT @throws SignatureException when verifying fails
ARG 1 verifier
ARG 2 message
METHOD method_43862 updateSignature (Lnet/minecraft/class_7498$class_7499;Lnet/minecraft/class_2561;Ljava/util/UUID;Ljava/time/Instant;J)V
COMMENT Updates {@code signature} with the passed parameters.
COMMENT Updates {@code updater} with the passed parameters.
COMMENT
COMMENT @implNote The data to be signed is {@code salt}, followed by big-endian ordered
COMMENT {@code uuid}, followed by {@code time} as seconds from the UTC epoch, followed by
@ -22,8 +23,9 @@ CLASS net/minecraft/class_7469 net/minecraft/network/encryption/ChatMessageSigna
COMMENT
COMMENT @throws SignatureException when updating signature fails
COMMENT
COMMENT @see ChatMessageSigner#sign
COMMENT @see ChatMessageSigner#sign(net.minecraft.network.encryption.Signer, Text)
COMMENT @see #verify
ARG 0 updater
ARG 1 message
ARG 2 sender
ARG 3 time
@ -33,5 +35,7 @@ CLASS net/minecraft/class_7469 net/minecraft/network/encryption/ChatMessageSigna
METHOD method_44124 canVerify ()Z
COMMENT {@return whether the signature can be verified}
COMMENT
COMMENT <p>Verifiable signature is not the same as verified signature. Signatures are verifiable
COMMENT if it has proper sender UUID and signature data. However, they can still fail to verify.
COMMENT <p>Verifiable signature is not the same as verified signature. A signatures is verifiable
COMMENT if it has proper sender UUID and signature data. However, it can still fail to verify.
METHOD method_44308 (Lnet/minecraft/class_2561;Lnet/minecraft/class_7498$class_7499;)V
ARG 2 updater

View File

@ -2,9 +2,14 @@ CLASS net/minecraft/class_7470 net/minecraft/network/encryption/ChatMessageSigne
COMMENT A signer for chat messages that produces {@link ChatMessageSignature}.
METHOD method_43864 sign (Lnet/minecraft/class_7501;Ljava/lang/String;)Lnet/minecraft/class_7469;
COMMENT {@return the chat message signature obtained by signing {@code message} with {@code signature}}
ARG 1 signer
ARG 2 message
METHOD method_43865 sign (Lnet/minecraft/class_7501;Lnet/minecraft/class_2561;)Lnet/minecraft/class_7469;
COMMENT {@return the chat message signature obtained by signing {@code message} with {@code signature}}
ARG 1 signer
ARG 2 message
METHOD method_43866 create (Ljava/util/UUID;)Lnet/minecraft/class_7470;
COMMENT {@return a new signer instance}
ARG 0 sender
METHOD method_44309 (Lnet/minecraft/class_2561;Lnet/minecraft/class_7498$class_7499;)V
ARG 2 updater

View File

@ -1,6 +1,12 @@
CLASS net/minecraft/class_7448 net/minecraft/network/encryption/CommandArgumentSigner
COMMENT A signer for command arguments.
FIELD field_39182 NONE Lnet/minecraft/class_7448;
METHOD getArgumentSignature (Ljava/lang/String;)Lnet/minecraft/class_7469;
ARG 1 argumentName
METHOD method_44250 isPreviewSigned (Ljava/lang/String;)Z
ARG 1 argumentName
METHOD method_44251 (Ljava/lang/String;)Lnet/minecraft/class_7469;
ARG 0 argumentName
CLASS class_7449 Signatures
COMMENT A signature for command arguments, consisting of the sender, the timestamp,
COMMENT and the signature datas for the arguments.

View File

@ -16,6 +16,8 @@ CLASS net/minecraft/class_7428 net/minecraft/network/encryption/PlayerPublicKey
COMMENT @throws InsecurePublicKeyException.MissingException when the key is missing or empty
COMMENT @throws InsecurePublicKeyException.InvalidException when the key is unsigned or expired
COMMENT @throws NetworkEncryptionException when the key is malformed
ARG 0 servicesSignatureVerifier
ARG 1 publicKeyData
METHOD method_43697 createSignatureInstance ()Lnet/minecraft/class_7500;
METHOD method_43698 fromKeyData (Lnet/minecraft/class_7428$class_7443;)Lnet/minecraft/class_7428;
ARG 0 publicKeyData
@ -32,3 +34,5 @@ CLASS net/minecraft/class_7428 net/minecraft/network/encryption/PlayerPublicKey
METHOD method_43704 isExpired ()Z
METHOD method_44011 write (Lnet/minecraft/class_2540;)V
ARG 1 buf
METHOD method_44205 verifyKey (Lnet/minecraft/class_7500;)Z
ARG 1 servicesSignatureVerifier

View File

@ -0,0 +1,6 @@
CLASS net/minecraft/class_7498 net/minecraft/network/encryption/SignatureUpdatable
METHOD update (Lnet/minecraft/class_7498$class_7499;)V
ARG 1 updater
CLASS class_7499 SignatureUpdater
METHOD update ([B)V
ARG 1 data

View File

@ -0,0 +1,26 @@
CLASS net/minecraft/class_7500 net/minecraft/network/encryption/SignatureVerifier
FIELD field_39397 NOOP Lnet/minecraft/class_7500;
FIELD field_39398 LOGGER Lorg/slf4j/Logger;
METHOD method_44170 (Lnet/minecraft/class_7498;[B)Z
ARG 0 updatable
ARG 1 signatureData
METHOD method_44171 verify (Lnet/minecraft/class_7498;[BLjava/security/Signature;)Z
ARG 0 updatable
ARG 1 signatureData
ARG 2 signature
METHOD method_44172 create (Lcom/mojang/authlib/yggdrasil/ServicesKeyInfo;)Lnet/minecraft/class_7500;
ARG 0 servicesKeyInfo
METHOD method_44174 (Ljava/lang/String;Ljava/security/PublicKey;Lnet/minecraft/class_7498;[B)Z
ARG 2 updatable
ARG 3 signatureData
METHOD method_44175 create (Ljava/security/PublicKey;Ljava/lang/String;)Lnet/minecraft/class_7500;
ARG 0 publicKey
ARG 1 algorithm
METHOD method_44176 ([BLnet/minecraft/class_7498$class_7499;)V
ARG 1 updater
METHOD method_44177 validate ([B[B)Z
ARG 1 signedData
ARG 2 signatureData
METHOD validate (Lnet/minecraft/class_7498;[B)Z
ARG 1 updatable
ARG 2 signatureData

View File

@ -29,3 +29,27 @@ CLASS net/minecraft/class_7471 net/minecraft/network/encryption/SignedChatMessag
COMMENT the client previewing it. In this case, the undecorated content is signed but the
COMMENT decorated content is unsigned.
ARG 1 unsignedContent
METHOD method_44310 verify (Lnet/minecraft/class_3222;)Z
COMMENT {@return whether the message can be verified using the public key <strong>or if the
COMMENT player does not have the key</strong>}
ARG 1 player
METHOD method_44311 toSignedMessage (Lnet/minecraft/class_5837;Lnet/minecraft/class_5837;Lnet/minecraft/class_7469;Z)Lnet/minecraft/class_5837;
ARG 0 original
ARG 1 decorated
ARG 2 signature
ARG 3 preview
METHOD method_44312 verify (Lnet/minecraft/class_2168;)Z
COMMENT {@return whether the message can be verified using the public key of the source
COMMENT <strong>or if the source does not have the key</strong>}
ARG 1 source
METHOD method_44313 of (Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Lnet/minecraft/class_7469;Z)Lnet/minecraft/class_7471;
COMMENT {@return a new signed chat message from the content supplied by the chat decorator}
COMMENT
COMMENT @implNote If the decorated content is different from the original and is not
COMMENT previewed, this will create a signed chat message with the signed original content
COMMENT and the unsigned decorated content. Otherwise, this will create a signed chat message
COMMENT with the signed decorated content.
ARG 0 originalContent
ARG 1 decoratedContent
ARG 2 signature
ARG 3 previewed

View File

@ -0,0 +1,13 @@
CLASS net/minecraft/class_7501 net/minecraft/network/encryption/Signer
FIELD field_39399 LOGGER Lorg/slf4j/Logger;
METHOD method_44178 (Ljava/lang/String;Ljava/security/PrivateKey;Lnet/minecraft/class_7498;)[B
ARG 2 updatable
METHOD method_44179 create (Ljava/security/PrivateKey;Ljava/lang/String;)Lnet/minecraft/class_7501;
ARG 0 privateKey
ARG 1 algorithm
METHOD method_44180 sign ([B)[B
ARG 1 data
METHOD method_44181 ([BLnet/minecraft/class_7498$class_7499;)V
ARG 1 updater
METHOD sign (Lnet/minecraft/class_7498;)[B
ARG 1 updatable

View File

@ -31,3 +31,5 @@ CLASS net/minecraft/class_2917 net/minecraft/network/packet/c2s/login/LoginKeyC2
METHOD method_43644 verifyEncryptedNonce ([BLjava/security/PrivateKey;)Z
ARG 1 nonce
ARG 2 privateKey
METHOD method_44316 ([BLnet/minecraft/class_3515$class_7425;Lnet/minecraft/class_7498$class_7499;)V
ARG 2 updater

View File

@ -10,13 +10,14 @@ CLASS net/minecraft/class_2797 net/minecraft/network/packet/c2s/play/ChatMessage
COMMENT reject the message and disconnect the client.
COMMENT
COMMENT <p>Messages that took more than {@link #TIME_TO_LIVE} to reach the server
COMMENT are considered expired and will be discarded.
COMMENT are considered expired and will be discarded. Messages can also be discarded
COMMENT if the server receives them with improper order.
COMMENT
COMMENT @see net.minecraft.client.network.ClientPlayerEntity#sendChatMessage
COMMENT @see net.minecraft.server.network.ServerPlayNetworkHandler#onChatMessage
FIELD field_12764 chatMessage Ljava/lang/String;
FIELD field_39086 TIME_TO_LIVE Ljava/time/Duration;
FIELD field_39087 time Ljava/time/Instant;
FIELD field_39087 timestamp Ljava/time/Instant;
FIELD field_39088 signature Lnet/minecraft/class_3515$class_7425;
FIELD field_39390 previewed Z
METHOD <init> (Ljava/lang/String;Lnet/minecraft/class_7469;Z)V
@ -32,3 +33,4 @@ CLASS net/minecraft/class_2797 net/minecraft/network/packet/c2s/play/ChatMessage
COMMENT {@return whether the chat message was previewed before sending}
COMMENT
COMMENT @apiNote Chat decorators can produce signed decorated content only if it was previewed.
METHOD method_44315 getTimestamp ()Ljava/time/Instant;

View File

@ -1,26 +1,28 @@
CLASS net/minecraft/class_7472 net/minecraft/network/packet/c2s/play/CommandExecutionC2SPacket
COMMENT A packet used to execute commands on the server.
COMMENT
COMMENT <p>This truncates the command to at most {@value #MAX_COMMAND_LENGTH} characters
COMMENT before sending to the server on the client. If the server receives the command
COMMENT longer than {@value #MAX_COMMAND_LENGTH} characters, it will reject the message
COMMENT and disconnect the client.
COMMENT <p>This truncates the command to at most 256 characters before sending to the
COMMENT server on the client. If the server receives the command longer than 256 characters,
COMMENT it will reject the message and disconnect the client.
COMMENT
COMMENT <p>If the command contains an invalid character (see {@link
COMMENT net.minecraft.SharedConstants#isValidChar isValidChar}), the server will
COMMENT reject the command and disconnect the client.
COMMENT
COMMENT <p>Commands that took more than {@link ChatMessageC2SPacket#TIME_TO_LIVE} to reach
COMMENT the server are considered expired and will be discarded.
COMMENT the server are considered expired and will be discarded. Commands can also be discarded
COMMENT if the server receives them with improper order.
COMMENT
COMMENT @see net.minecraft.client.network.ClientPlayerEntity#sendCommand
COMMENT @see net.minecraft.server.network.ServerPlayNetworkHandler#onCommandExecution
FIELD comp_809 time Ljava/time/Instant;
FIELD comp_809 timestamp Ljava/time/Instant;
METHOD <init> (Ljava/lang/String;Ljava/time/Instant;Lnet/minecraft/class_7450;Z)V
ARG 1 command
ARG 2 timestamp
ARG 3 argumentSignatures
ARG 4 signedPreview
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf
METHOD comp_809 time ()Ljava/time/Instant;
METHOD comp_809 timestamp ()Ljava/time/Instant;
METHOD method_43896 createArgumentsSigner (Ljava/util/UUID;)Lnet/minecraft/class_7448;
ARG 1 sender

View File

@ -21,11 +21,11 @@ CLASS net/minecraft/class_7438 net/minecraft/network/packet/s2c/play/ChatMessage
COMMENT
COMMENT @see net.minecraft.server.network.ServerPlayerEntity#sendChatMessage
COMMENT @see net.minecraft.client.network.ClientPlayNetworkHandler#onChatMessage
FIELD comp_761 time Ljava/time/Instant;
FIELD comp_761 timestamp Ljava/time/Instant;
FIELD field_39085 TIME_TO_LIVE Ljava/time/Duration;
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf
METHOD comp_761 time ()Ljava/time/Instant;
METHOD comp_761 timestamp ()Ljava/time/Instant;
METHOD method_43628 isExpired (Ljava/time/Instant;)Z
COMMENT {@return whether the message is considered expired}
ARG 1 currentTime

View File

@ -8,6 +8,10 @@ CLASS net/minecraft/server/Main
ARG 2 eraseCache
ARG 3 continueCheck
ARG 4 generatorOptions
METHOD method_29734 (Lnet/minecraft/class_32$class_5143;Lnet/minecraft/class_3283;Lnet/minecraft/class_6904;Lnet/minecraft/class_3807;Lnet/minecraft/class_7497;Ljoptsimple/OptionSet;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljava/lang/Thread;)Lnet/minecraft/class_3176;
ARG 12 thread
METHOD method_43612 (Lnet/minecraft/class_7237$class_6906;Lnet/minecraft/class_32$class_5143;Ljoptsimple/OptionSet;Ljoptsimple/OptionSpec;Lnet/minecraft/class_3807;Ljoptsimple/OptionSpec;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
ARG 6 applyExecutor
METHOD method_43613 (Lnet/minecraft/class_32$class_5143;Ljoptsimple/OptionSet;Ljoptsimple/OptionSpec;Lnet/minecraft/class_3807;Ljoptsimple/OptionSpec;Lnet/minecraft/class_3300;Lnet/minecraft/class_5359;)Lcom/mojang/datafixers/util/Pair;
ARG 5 resourceManager
ARG 6 dataPackSettings

View File

@ -46,6 +46,7 @@ CLASS net/minecraft/server/MinecraftServer
FIELD field_35437 saving Z
FIELD field_35641 ANONYMOUS_PLAYER_PROFILE Lcom/mojang/authlib/GameProfile;
FIELD field_39214 hostProfile Lcom/mojang/authlib/GameProfile;
FIELD field_39440 apiServices Lnet/minecraft/class_7497;
FIELD field_4543 onlineMode Z
FIELD field_4544 running Z
FIELD field_4546 LOGGER Lorg/slf4j/Logger;
@ -86,6 +87,8 @@ CLASS net/minecraft/server/MinecraftServer
ARG 4 saveLoader
ARG 5 proxy
ARG 6 dataFixer
ARG 7 apiServices
ARG 8 worldGenerationProgressListenerFactory
METHOD method_15876 getMetricsData ()Lnet/minecraft/class_3517;
METHOD method_16043 isStopping ()Z
METHOD method_16044 getProfiler ()Lnet/minecraft/class_3695;
@ -210,6 +213,8 @@ CLASS net/minecraft/server/MinecraftServer
ARG 1 demo
METHOD method_3731 setEnforceWhitelist (Z)V
ARG 1 enforceWhitelist
METHOD method_37318 (Lnet/minecraft/class_3696;)V
ARG 1 profileResult
METHOD method_37319 (Ljava/util/function/Consumer;Lnet/minecraft/class_3696;)V
ARG 2 result
METHOD method_3732 shouldBroadcastRconToOps ()Z
@ -221,6 +226,8 @@ CLASS net/minecraft/server/MinecraftServer
METHOD method_37323 stopRecorder ()V
METHOD method_37324 addSystemDetails (Lnet/minecraft/class_6396;)Lnet/minecraft/class_6396;
ARG 1 details
METHOD method_37329 (Ljava/nio/file/Path;)V
ARG 0 path
METHOD method_3734 getCommandManager ()Lnet/minecraft/class_2170;
COMMENT Gets the server's command manager.
COMMENT The command manager is responsible for parsing and dispatching commands.
@ -411,6 +418,7 @@ CLASS net/minecraft/server/MinecraftServer
COMMENT {@return the chat decorator used by the server}
COMMENT
COMMENT <p>See the documentation of {@link ChatDecorator} for more information.
METHOD method_44301 getServicesSignatureVerifier ()Lnet/minecraft/class_7500;
METHOD method_5387 isMainThread ()Z
CLASS class_6414 DebugStart
FIELD field_33980 time J

View File

@ -145,7 +145,8 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT message can be sent to a different player.
COMMENT
COMMENT @see #broadcast(Text, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, TextStream.Message, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
ARG 1 message
@ -173,7 +174,8 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT
COMMENT @see #broadcast(Text, RegistryKey)
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, TextStream.Message, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
ARG 1 message
ARG 2 playerMessageFactory
@ -189,7 +191,8 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT message or a join/leave message.
COMMENT
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, TextStream.Message, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
ARG 1 message
@ -216,8 +219,12 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT
COMMENT @see #broadcast(Text, RegistryKey)
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
ARG 1 message
ARG 2 sender
ARG 3 typeKey
METHOD method_43674 broadcast (Lnet/minecraft/class_7471;Lnet/minecraft/class_7436;Lnet/minecraft/class_5321;)V
COMMENT Broadcasts a chat message to all players and the server console.
COMMENT
@ -234,8 +241,26 @@ CLASS net/minecraft/class_3324 net/minecraft/server/PlayerManager
COMMENT
COMMENT @see #broadcast(Text, RegistryKey)
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, TextStream.Message, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerCommandSource, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
ARG 1 message
ARG 2 sender
ARG 3 typeKey
METHOD method_44165 (Lnet/minecraft/class_5837;Lnet/minecraft/class_3222;Lnet/minecraft/class_3222;)Lnet/minecraft/class_7471;
ARG 2 player
METHOD method_44166 broadcast (Lnet/minecraft/class_5837;Lnet/minecraft/class_2168;Lnet/minecraft/class_5321;)V
COMMENT Broadcasts a chat message to all players and the server console.
COMMENT
COMMENT @apiNote This method is used to broadcast a message sent by commands like
COMMENT {@link net.minecraft.server.command.MeCommand} or
COMMENT {@link net.minecraft.server.command.SayCommand} .
COMMENT
COMMENT @see #broadcast(Text, RegistryKey)
COMMENT @see #broadcast(Text, Function, RegistryKey)
COMMENT @see #broadcast(FilteredMessage, ServerPlayerEntity, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, MessageSender, RegistryKey)
COMMENT @see #broadcast(SignedChatMessage, Function, MessageSender, RegistryKey)
ARG 1 message
ARG 2 source
ARG 3 typeKey

View File

@ -16,6 +16,11 @@ CLASS net/minecraft/class_2170 net/minecraft/server/command/CommandManager
ARG 2 child
ARG 3 sibling
ARG 4 inputs
METHOD method_44252 executeWithPrefix (Lnet/minecraft/class_2168;Ljava/lang/String;)I
COMMENT Executes {@code command}. Unlike {@link #execute} the command can be prefixed
COMMENT with a slash.
ARG 1 source
ARG 2 command
METHOD method_9235 getDispatcher ()Lcom/mojang/brigadier/CommandDispatcher;
METHOD method_9236 (Ljava/lang/String;Lnet/minecraft/class_2583;)Lnet/minecraft/class_2583;
ARG 1 style
@ -46,6 +51,9 @@ CLASS net/minecraft/class_2170 net/minecraft/server/command/CommandManager
ARG 1 success
ARG 2 result
METHOD method_9249 execute (Lnet/minecraft/class_2168;Ljava/lang/String;)I
COMMENT Executes {@code command}. The command cannot be prefixed with a slash.
COMMENT
COMMENT @see #executeWithPrefix(ServerCommandSource, String)
ARG 1 commandSource
ARG 2 command
CLASS class_2171 CommandParser

View File

@ -3,3 +3,5 @@ CLASS net/minecraft/class_3045 net/minecraft/server/command/MeCommand
ARG 0 dispatcher
METHOD method_13238 (Lcom/mojang/brigadier/context/CommandContext;)I
ARG 0 context
METHOD method_43645 (Lnet/minecraft/class_3324;Lnet/minecraft/class_2168;Lnet/minecraft/class_5837;)V
ARG 2 decoratedMessage

View File

@ -4,5 +4,8 @@ CLASS net/minecraft/class_3082 net/minecraft/server/command/MessageCommand
METHOD method_13462 execute (Lnet/minecraft/class_2168;Ljava/util/Collection;Lnet/minecraft/class_2196$class_7515;)I
ARG 0 source
ARG 1 targets
ARG 2 signedMessage
METHOD method_13463 (Lcom/mojang/brigadier/context/CommandContext;)I
ARG 0 context
METHOD method_44144 (Ljava/util/Collection;Lnet/minecraft/class_2168;Lnet/minecraft/class_5837;)V
ARG 2 decoratedMessage

View File

@ -5,3 +5,5 @@ CLASS net/minecraft/class_3110 net/minecraft/server/command/SayCommand
ARG 0 context
METHOD method_13564 (Lnet/minecraft/class_2168;)Z
ARG 0 source
METHOD method_43657 (Lnet/minecraft/class_3324;Lnet/minecraft/class_2168;Lnet/minecraft/class_5837;)V
ARG 2 decoratedMessage

View File

@ -3,7 +3,10 @@ CLASS net/minecraft/class_3945 net/minecraft/server/command/TeamMsgCommand
FIELD field_24380 STYLE Lnet/minecraft/class_2583;
METHOD method_17599 execute (Lnet/minecraft/class_2168;Lnet/minecraft/class_2196$class_7515;)I
ARG 0 source
ARG 1 signedMessage
METHOD method_17600 register (Lcom/mojang/brigadier/CommandDispatcher;)V
ARG 0 dispatcher
METHOD method_17601 (Lcom/mojang/brigadier/context/CommandContext;)I
ARG 0 context
METHOD method_44148 (Ljava/util/List;Lnet/minecraft/class_1297;Lnet/minecraft/class_2561;Lnet/minecraft/class_2168;Lnet/minecraft/class_7436;Lnet/minecraft/class_5837;)V
ARG 5 decoratedMessage

View File

@ -14,6 +14,8 @@ CLASS net/minecraft/class_3176 net/minecraft/server/dedicated/MinecraftDedicated
ARG 4 saveLoader
ARG 5 propertiesLoader
ARG 6 dataFixer
ARG 7 apiServices
ARG 8 worldGenerationProgressListenerFactory
METHOD method_13941 executeQueuedCommands ()V
METHOD method_13942 sleepFiveSeconds ()V
METHOD method_13944 getMaxTickTime ()J

View File

@ -0,0 +1,29 @@
CLASS net/minecraft/class_5837 net/minecraft/server/filter/FilteredMessage
COMMENT A message from the {@link TextFilterer}.
FIELD comp_841 raw Ljava/lang/Object;
COMMENT the raw (or "original") message
FIELD comp_842 filtered Ljava/lang/Object;
COMMENT the filtered message, or {@code null} if everything was filtered ("censored")
FIELD field_28863 EMPTY Lnet/minecraft/class_5837;
METHOD comp_841 raw ()Ljava/lang/Object;
METHOD comp_842 filtered ()Ljava/lang/Object;
METHOD method_33802 permitted (Ljava/lang/Object;)Lnet/minecraft/class_5837;
COMMENT {@return the message with nothing filtered}
ARG 0 filterable
METHOD method_33804 censored (Ljava/lang/Object;)Lnet/minecraft/class_5837;
COMMENT {@return the message with everything filtered}
ARG 0 filterable
METHOD method_43933 isFiltered ()Z
COMMENT {@return if some of the messages are filtered}
METHOD method_44149 getFilterableFor (Lnet/minecraft/class_3222;Lnet/minecraft/class_3222;)Ljava/lang/Object;
ARG 1 sender
ARG 2 receiver
METHOD method_44150 getFilterableFor (Lnet/minecraft/class_2168;Lnet/minecraft/class_3222;)Ljava/lang/Object;
ARG 1 source
ARG 2 receiver
METHOD method_44151 map (Ljava/util/function/Function;)Lnet/minecraft/class_5837;
ARG 1 mapper
METHOD method_44152 isCensored ()Z
COMMENT {@return if all of the messages are filtered, e.g. by using {@link #censored}}
METHOD method_44153 filteredOrElse (Ljava/lang/Object;)Ljava/lang/Object;
ARG 1 filterable

View File

@ -1,9 +0,0 @@
CLASS net/minecraft/class_5837 net/minecraft/server/filter/Message
FIELD comp_841 raw Ljava/lang/Object;
FIELD comp_842 filtered Ljava/lang/Object;
FIELD field_28863 EMPTY Lnet/minecraft/class_5837;
METHOD comp_841 raw ()Ljava/lang/Object;
METHOD comp_842 filtered ()Ljava/lang/Object;
METHOD method_33802 permitted (Ljava/lang/Object;)Lnet/minecraft/class_5837;
METHOD method_33804 censored (Ljava/lang/Object;)Lnet/minecraft/class_5837;
METHOD method_43933 hasFilteredText ()Z

View File

@ -64,8 +64,8 @@ CLASS net/minecraft/class_5514 net/minecraft/server/filter/TextFilterer
METHOD method_42112 (Ljava/lang/String;Ljava/lang/String;Lcom/mojang/authlib/GameProfile;)Lcom/google/gson/JsonObject;
ARG 2 profile
METHOD method_42113 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/mojang/authlib/GameProfile;Ljava/lang/String;)Lcom/google/gson/JsonObject;
ARG 0 profile
ARG 1 message
ARG 3 profile
ARG 4 message
CLASS class_5515 HashIgnorer
FIELD field_26834 NEVER_IGNORE Lnet/minecraft/class_5514$class_5515;
FIELD field_26835 IGNORE_IF_MATCHES_ALL Lnet/minecraft/class_5514$class_5515;

View File

@ -6,3 +6,7 @@ CLASS net/minecraft/class_5513 net/minecraft/server/filter/TextStream
METHOD method_31289 filterTexts (Ljava/util/List;)Ljava/util/concurrent/CompletableFuture;
ARG 1 texts
METHOD method_31290 onDisconnect ()V
METHOD method_44163 filterText (Lnet/minecraft/class_2561;)Ljava/util/concurrent/CompletableFuture;
ARG 1 text
METHOD method_44164 (Lnet/minecraft/class_2561;Lnet/minecraft/class_5837;)Lnet/minecraft/class_5837;
ARG 1 filteredMessage

View File

@ -13,6 +13,8 @@ CLASS net/minecraft/class_1132 net/minecraft/server/integrated/IntegratedServer
ARG 3 session
ARG 4 dataPackManager
ARG 5 saveLoader
ARG 6 apiServices
ARG 7 worldGenerationProgressListenerFactory
METHOD method_36439 incrementTotalWorldTimeStat ()V
METHOD method_4817 setLocalPlayerUuid (Ljava/util/UUID;)V
ARG 1 localPlayerUuid

View File

@ -64,6 +64,7 @@ CLASS net/minecraft/class_3248 net/minecraft/server/network/ServerLoginNetworkHa
ARG 0 name
METHOD method_43510 getVerifiedPublicKey (Lnet/minecraft/class_2915;Lnet/minecraft/class_7500;Z)Lnet/minecraft/class_7428;
ARG 0 packet
ARG 1 servicesSignatureVerifier
ARG 2 shouldThrowOnMissingKey
CLASS 1
METHOD method_14386 getClientAddress ()Ljava/net/InetAddress;

View File

@ -35,7 +35,9 @@ CLASS net/minecraft/class_3244 net/minecraft/server/network/ServerPlayNetworkHan
FIELD field_37280 MAX_BREAK_SQUARED_DISTANCE D
FIELD field_37282 sequence I
FIELD field_39261 previewTaskRunner Lnet/minecraft/class_7493;
FIELD field_39394 lastMessageTimestamp Ljava/util/concurrent/atomic/AtomicReference;
METHOD <init> (Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/class_2535;Lnet/minecraft/class_3222;)V
ARG 1 server
ARG 2 connection
ARG 3 player
METHOD method_14360 requestTeleport (DDDFFLjava/util/Set;)V
@ -69,6 +71,8 @@ CLASS net/minecraft/class_3244 net/minecraft/server/network/ServerPlayNetworkHan
ARG 6 yaw
ARG 7 pitch
METHOD method_14372 syncWithPlayerPosition ()V
METHOD method_17820 (Lnet/minecraft/class_2840;Lnet/minecraft/class_1860;)V
ARG 2 recipe
METHOD method_18784 tick ()V
METHOD method_19507 isHost ()Z
METHOD method_20630 isPlayerNotCollidingWithBlocks (Lnet/minecraft/class_4538;Lnet/minecraft/class_238;)Z
@ -111,6 +115,7 @@ CLASS net/minecraft/class_3244 net/minecraft/server/network/ServerPlayNetworkHan
METHOD method_31285 (Lnet/minecraft/class_2877;Ljava/util/List;)V
ARG 2 texts
METHOD method_31286 handleMessage (Lnet/minecraft/class_2797;Lnet/minecraft/class_5837;)V
ARG 1 packet
ARG 2 message
METHOD method_33562 requestTeleportAndDismount (DDDFF)V
ARG 1 x
@ -149,6 +154,32 @@ CLASS net/minecraft/class_3244 net/minecraft/server/network/ServerPlayNetworkHan
ARG 2 message
METHOD method_43668 checkChatEnabled ()Z
METHOD method_43669 checkForSpam ()V
METHOD method_44154 (ILnet/minecraft/class_2561;)V
ARG 2 decorated
METHOD method_44155 handleDecoratedMessage (Lnet/minecraft/class_5837;)V
ARG 1 message
METHOD method_44156 decorateCommand (Lcom/mojang/brigadier/context/CommandContextBuilder;)Ljava/util/concurrent/CompletableFuture;
ARG 1 builder
METHOD method_44157 isExpired (Ljava/time/Instant;)Z
COMMENT {@return whether the message sent at {@code timestamp} is expired}
COMMENT
COMMENT <p>If {@code true}, the message will be discarded.
COMMENT
COMMENT @see ChatMessageC2SPacket#TIME_TO_LIVE
ARG 1 timestamp
METHOD method_44158 (Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;
ARG 1 decorated
METHOD method_44159 decorate (Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
ARG 1 query
METHOD method_44160 isDisordered (Ljava/time/Instant;)Z
COMMENT {@return whether the message sent at {@code timestamp} is received with improper order}
COMMENT
COMMENT <p>If {@code true}, the message will be discarded.
ARG 1 timestamp
METHOD method_44161 decorateChat (Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
ARG 1 query
METHOD method_44162 decorateCommand (Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
ARG 1 query
CLASS 1
METHOD method_33897 processInteract (Lnet/minecraft/class_1268;Lnet/minecraft/class_3244$class_5860;)V
ARG 1 hand

View File

@ -0,0 +1,9 @@
CLASS net/minecraft/class_7497 net/minecraft/util/ApiServices
FIELD comp_838 serviceSignatureVerifier Lnet/minecraft/class_7500;
FIELD comp_840 userCache Lnet/minecraft/class_3312;
FIELD field_39392 USER_CACHE_FILE_NAME Ljava/lang/String;
METHOD comp_838 serviceSignatureVerifier ()Lnet/minecraft/class_7500;
METHOD comp_840 userCache ()Lnet/minecraft/class_3312;
METHOD method_44143 create (Lcom/mojang/authlib/yggdrasil/YggdrasilAuthenticationService;Ljava/io/File;)Lnet/minecraft/class_7497;
ARG 0 authenticationService
ARG 1 rootDirectory

View File

@ -1,9 +1,13 @@
CLASS net/minecraft/class_7493 net/minecraft/util/PendingTaskRunner
COMMENT A runner for tasks that have a running state and can hold one pending task.
COMMENT A runner for tasks that can hold one pending task.
COMMENT
COMMENT <p>If there is no running tasks, calling {@link #run} will run the passed task
COMMENT and marks the runner as running. During this state, calling the run method will set
COMMENT the task as pending. If called multiple times, only the last task will be called.
COMMENT Calling {@link #runPending} forces it to run the pending task, if any.
COMMENT <p>To queue a task for running, call {@link #queue}, and to run the task,
COMMENT call {@link #runPending}.
FIELD field_39442 reference Ljava/util/concurrent/atomic/AtomicReference;
FIELD field_39443 future Ljava/util/concurrent/CompletableFuture;
METHOD method_44122 runPending ()V
COMMENT Runs the pending task, if any, and marks the runner as not running.
METHOD method_44306 queue (Lnet/minecraft/class_7493$class_7518;)V
ARG 1 task
METHOD method_44307 runPendingInternal ()V
CLASS class_7518 FutureRunnable