22w17a: Network stuff + more (#3121)

* 22w17a: map chat message packet

* goat: horns

* map signed chat message

* Add missing new class mappings

* apply suggestions from @enbrain

* rename class_7428 to PlayerPublicKey

* network: apply suggestions

* fix wrong package for SignedChatMessageS2CPacket

* rename ChatMessageS2CP to GameMessage

* fix ChatMessageS2C name, ChatMessageC2S: rename instant to time

* remove comp mappings
This commit is contained in:
Moritz Zwerger 2022-04-28 17:20:42 +02:00 committed by GitHub
parent 302baad866
commit af6d2df045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 67 additions and 0 deletions

View File

@ -8,6 +8,8 @@ CLASS net/minecraft/class_6053 net/minecraft/entity/passive/GoatEntity
FIELD field_33487 preparingRam Z
FIELD field_34022 DEFAULT_ATTACK_DAMAGE I
FIELD field_34023 BABY_ATTACK_DAMAGE I
FIELD field_39047 LEFT_HORN Lnet/minecraft/class_2940;
FIELD field_39048 RIGHT_HORN Lnet/minecraft/class_2940;
METHOD method_35178 isScreaming ()Z
METHOD method_35179 createGoatAttributes ()Lnet/minecraft/class_5132$class_5133;
METHOD method_35180 getMilkingSound ()Lnet/minecraft/class_3414;
@ -20,3 +22,7 @@ CLASS net/minecraft/class_6053 net/minecraft/entity/passive/GoatEntity
ARG 2 spawnReason
ARG 3 pos
ARG 4 random
METHOD method_43538 hasLeftHorn ()Z
METHOD method_43539 hasRightHorn ()Z
METHOD method_43541 addHorns ()V
METHOD method_43542 removeHorns ()V

View File

@ -0,0 +1,5 @@
CLASS net/minecraft/class_7436 net/minecraft/network/ChatMessageSender
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf
METHOD method_43625 write (Lnet/minecraft/class_2540;)V
ARG 1 buf

View File

@ -35,3 +35,15 @@ CLASS net/minecraft/class_3515 net/minecraft/network/encryption/NetworkEncryptio
ARG 0 opMode
ARG 1 key
ARG 2 data
METHOD method_43523 updateSignature (Ljava/security/Signature;JLjava/util/UUID;Ljava/time/Instant;Ljava/lang/String;)V
ARG 0 signature
ARG 3 uuid
ARG 4 time
ARG 5 message
CLASS class_7425 SignatureData
METHOD method_43528 isSignaturePresent ()Z
METHOD method_43529 write (Lnet/minecraft/class_2540;)V
ARG 1 buf
CLASS class_7426 SecureRandomUtil
FIELD field_39041 SECURE_RANDOM Ljava/security/SecureRandom;
METHOD method_43531 nextLong ()J

View File

@ -0,0 +1,17 @@
CLASS net/minecraft/class_7428 net/minecraft/network/encryption/PlayerPublicKey
FIELD field_39051 PUBLIC_KEY Ljava/lang/String;
METHOD <init> (Lcom/mojang/datafixers/util/Pair;Ljava/lang/String;)V
ARG 1 expiresAtAndKey
ARG 2 signature
METHOD method_43548 toProperty ()Lcom/mojang/authlib/properties/Property;
METHOD method_43549 (Lcom/mojang/authlib/GameProfile;)Ljava/util/Optional;
ARG 0 gameProfile
METHOD method_43550 (Lcom/mojang/authlib/minecraft/MinecraftSessionService;)Lnet/minecraft/class_7428$class_7429;
ARG 1 sessionService
METHOD method_43552 (Ljava/lang/String;)Ljava/util/Optional;
ARG 0 key
METHOD method_43554 isExpired ()Z
METHOD method_43555 (Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile;
ARG 1 gameProfile
CLASS class_7429
METHOD method_43557 createSignatureInstance ()Ljava/security/Signature;

View File

@ -197,3 +197,7 @@ CLASS net/minecraft/class_2602 net/minecraft/network/listener/ClientPlayPacketLi
ARG 1 packet
METHOD method_39025 onSimulationDistance (Lnet/minecraft/class_6682;)V
ARG 1 packet
METHOD method_43595 onChatMessage (Lnet/minecraft/class_7438;)V
ARG 1 packet
METHOD method_43596 onGameMessage (Lnet/minecraft/class_7439;)V
ARG 1 packet

View File

@ -14,8 +14,21 @@ CLASS net/minecraft/class_2797 net/minecraft/network/packet/c2s/play/ChatMessage
COMMENT @see net.minecraft.server.network.ServerPlayNetworkHandler#onChatMessage
FIELD field_12764 chatMessage Ljava/lang/String;
FIELD field_33359 MAX_LENGTH I
FIELD field_39086 TWO_MINUTES Ljava/time/Duration;
FIELD field_39087 time Ljava/time/Instant;
FIELD field_39088 signature Lnet/minecraft/class_3515$class_7425;
METHOD <init> (Ljava/time/Instant;Ljava/lang/String;Lnet/minecraft/class_3515$class_7425;)V
ARG 1 time
ARG 2 chatMessage
ARG 3 signature
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf
METHOD method_12114 getChatMessage ()Ljava/lang/String;
METHOD method_43632 truncateMessage (Ljava/lang/String;)Ljava/lang/String;
ARG 0 message
METHOD method_43633 (Ljava/time/Instant;)Z
ARG 1 time
METHOD method_43634 getTime ()Ljava/time/Instant;
METHOD method_43635 getNormalizedChatMessage ()Ljava/lang/String;
METHOD method_43636 getSignature ()Lnet/minecraft/class_3515$class_7425;
METHOD method_43637 offsetInstantTime ()Ljava/time/Instant;

View File

@ -0,0 +1,6 @@
CLASS net/minecraft/class_7438 net/minecraft/network/packet/s2c/play/ChatMessageS2CPacket
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf
METHOD method_43627 isSignatureValid (Lnet/minecraft/class_7428$class_7429;)Z
METHOD method_43628 (Ljava/time/Instant;)Z
ARG 1 sendingTime

View File

@ -0,0 +1,3 @@
CLASS net/minecraft/class_7439 net/minecraft/network/packet/s2c/play/GameMessageS2CPacket
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf

View File

@ -9,6 +9,7 @@ CLASS net/minecraft/class_5699 net/minecraft/util/dynamic/Codecs
FIELD field_34387 POSITIVE_FLOAT Lcom/mojang/serialization/Codec;
FIELD field_37408 REGULAR_EXPRESSION Lcom/mojang/serialization/Codec;
FIELD field_38081 UUID Lcom/mojang/serialization/Codec;
FIELD field_39042 INSTANT Lcom/mojang/serialization/Codec;
METHOD method_33817 xor (Lcom/mojang/serialization/Codec;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
COMMENT Returns an exclusive-or codec for {@link Either} instances.
COMMENT