Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network related notes and changes #3624

Merged
merged 4 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mappings/net/minecraft/network/encoding/VarInts.mapping
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
CLASS net/minecraft/class_8703 net/minecraft/network/encoding/VarInts
FIELD field_45682 MAX_BYTES I
FIELD field_45683 DATA_BITS_MASK I
FIELD field_45684 MORE_BITS_MASK I
FIELD field_45685 DATA_BITS_PER_BYTE I
METHOD method_53014 shouldContinueRead (B)Z
ARG 0 b
METHOD method_53015 getSizeInBytes (I)I
Expand Down
4 changes: 4 additions & 0 deletions mappings/net/minecraft/network/encoding/VarLongs.mapping
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
CLASS net/minecraft/class_8704 net/minecraft/network/encoding/VarLongs
FIELD field_45686 MAX_BYTES I
FIELD field_45687 DATA_BITS_MASK I
FIELD field_45688 MORE_BITS_MASK I
FIELD field_45689 DATA_BITS_PER_BYTE I
METHOD method_53018 shouldContinueRead (B)Z
ARG 0 b
METHOD method_53019 getSizeInBytes (J)I
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CLASS net/minecraft/class_8705 net/minecraft/network/listener/ClientCommonPacket
ARG 1 packet
METHOD method_52782 onKeepAlive (Lnet/minecraft/class_2670;)V
ARG 1 packet
METHOD method_52783 onPlayPing (Lnet/minecraft/class_6373;)V
METHOD method_52783 onPing (Lnet/minecraft/class_6373;)V
ARG 1 packet
METHOD method_52784 onResourcePackSend (Lnet/minecraft/class_2720;)V
ARG 1 packet
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CLASS net/minecraft/class_8706 net/minecraft/network/listener/ServerCommonPacket
ARG 1 packet
METHOD method_52393 onKeepAlive (Lnet/minecraft/class_2827;)V
ARG 1 packet
METHOD method_52394 onPlayPong (Lnet/minecraft/class_6374;)V
METHOD method_52394 onPong (Lnet/minecraft/class_6374;)V
ARG 1 packet
METHOD method_52395 onResourcePackStatus (Lnet/minecraft/class_2856;)V
ARG 1 packet
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CLASS net/minecraft/class_7633 net/minecraft/network/listener/TickablePacketListener
METHOD method_18784 tick ()V
COMMENT Ticks this packet listener on the game engine thread. The listener is responsible
COMMENT for synchronizing between the game engine and netty event loop threads.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CLASS net/minecraft/class_8709 net/minecraft/network/packet/s2c/custom/BrandCustomPayload
CLASS net/minecraft/class_8709 net/minecraft/network/packet/BrandCustomPayload
FIELD field_45697 ID Lnet/minecraft/class_2960;
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf
4 changes: 4 additions & 0 deletions mappings/net/minecraft/network/packet/Packet.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ CLASS net/minecraft/class_2596 net/minecraft/network/packet/Packet
METHOD method_52273 getNewNetworkState ()Lnet/minecraft/class_2539;
COMMENT {@return a new network state to transition to, or {@code null}
COMMENT to indicate no state change}
COMMENT <p>
COMMENT The state transition is done on both the sender and receiver sides, but it
COMMENT is only in one direction (out of C2S and S2C). Another packet must be processed
COMMENT in the reverse direction to ensure the state in both directions are updated.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
CLASS net/minecraft/class_6374 net/minecraft/network/packet/c2s/common/PlayPongC2SPacket
CLASS net/minecraft/class_6374 net/minecraft/network/packet/c2s/common/CommonPongC2SPacket
COMMENT This is a packet that is sent by the client during tick after receiving a
COMMENT play ping packet from the server, passing the {@link #parameter} back to the
COMMENT server.
COMMENT
COMMENT @see net.minecraft.network.packet.s2c.common.PlayPingS2CPacket
COMMENT @see net.minecraft.network.packet.s2c.common.CommonPingS2CPacket
COMMENT @see net.minecraft.network.packet.c2s.common.KeepAliveC2SPacket
COMMENT @see net.minecraft.network.packet.c2s.query.QueryPingC2SPacket
FIELD field_33752 parameter I
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CLASS net/minecraft/class_8592 net/minecraft/network/ConnectionIntent
CLASS net/minecraft/class_8592 net/minecraft/network/packet/c2s/handshake/ConnectionIntent
FIELD field_44976 STATUS_ID I
FIELD field_44977 LOGIN_ID I
METHOD method_52283 getId ()I
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CLASS net/minecraft/class_6373 net/minecraft/network/packet/s2c/common/PlayPingS2CPacket
CLASS net/minecraft/class_6373 net/minecraft/network/packet/s2c/common/CommonPingS2CPacket
COMMENT A packet sent by the server; the client will reply with a pong packet on the
COMMENT first tick after it receives this packet, with the same {@link #parameter}.
COMMENT
COMMENT @see net.minecraft.network.packet.c2s.common.PlayPongC2SPacket
COMMENT @see net.minecraft.network.packet.c2s.common.CommonPongC2SPacket
COMMENT @see net.minecraft.network.packet.s2c.common.KeepAliveS2CPacket
COMMENT @see net.minecraft.network.packet.s2c.query.QueryPongS2CPacket
FIELD field_33751 parameter I
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ CLASS net/minecraft/class_8610 net/minecraft/server/network/ServerConfigurationN
METHOD method_52407 (Lnet/minecraft/server/MinecraftServer$class_7460;)V
ARG 1 properties
METHOD method_52409 sendConfigurations ()V
METHOD method_52410 queueJoinWorldTask ()V
METHOD method_52410 endConfiguration ()V
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this is correct, this method is only called from the unconfig debug command, and is not used during normal login/play. cancelConfiguration may be slightly better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't immediately end configuration indeed, but it prevents further tasks effectively. And its body is the same as the end of the sendConfiguration method.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not wrong, and it is better than queueJoinWorldTask. Unless you have another idea im happy to go with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess will go with this and see mojang changes in snapshot

METHOD method_52411 queueSendResourcePackTask ()V
METHOD method_52412 pollTask ()V
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ CLASS net/minecraft/class_3244 net/minecraft/server/network/ServerPlayNetworkHan
METHOD method_46366 (Lnet/minecraft/class_7822;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
ARG 2 executor
METHOD method_48107 getConnectionAddress ()Ljava/net/SocketAddress;
METHOD method_52414 reconfigurate ()V
liach marked this conversation as resolved.
Show resolved Hide resolved
METHOD method_52415 cleanUp ()V
CLASS 1
METHOD method_33897 processInteract (Lnet/minecraft/class_1268;Lnet/minecraft/class_3244$class_5860;)V
ARG 1 hand
Expand Down