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

Some more renames #3771

Merged
merged 2 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions mappings/net/minecraft/network/NetworkPhase.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CLASS net/minecraft/class_2539 net/minecraft/network/NetworkPhase
FIELD field_20594 id Ljava/lang/String;
METHOD <init> (Ljava/lang/String;ILjava/lang/String;)V
ARG 3 id
METHOD method_10785 getId ()Ljava/lang/String;
5 changes: 0 additions & 5 deletions mappings/net/minecraft/network/NetworkStateType.mapping

This file was deleted.

15 changes: 11 additions & 4 deletions mappings/net/minecraft/network/codec/PacketCodec.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CLASS net/minecraft/class_9139 net/minecraft/network/codec/PacketCodec
COMMENT code, use {@link #of(ValueFirstEncoder, PacketDecoder)}
COMMENT like this:
COMMENT
COMMENT <p><pre>{@code
COMMENT <pre>{@code
COMMENT public static final PacketCodec<PacketByteBuf, MyPacket> CODEC = PacketCodec.of(MyPacket::write, MyPacket::new);
COMMENT
COMMENT private MyPacket(PacketByteBuf buf) {
Expand All @@ -30,6 +30,13 @@ CLASS net/minecraft/class_9139 net/minecraft/network/codec/PacketCodec
COMMENT phases (like configuration)
COMMENT @param <V> the type of the value to be encoded/decoded
METHOD method_56430 cast ()Lnet/minecraft/class_9139;
COMMENT {@return the same codec, casted to work with buffers of type {@code S}}
COMMENT
COMMENT @apiNote For example, {@link net.minecraft.util.math.BlockPos#PACKET_CODEC}
COMMENT is defined as {@code PacketCodec<ByteBuf, BlockPos>}. To use this codec
COMMENT where {@link net.minecraft.network.PacketByteBuf} is expected, you can call
COMMENT this method for easy casting, like: {@code PACKET_CODEC.cast()}.
COMMENT Doing this is generally safe and will not result in exceptions.
METHOD method_56431 unit (Ljava/lang/Object;)Lnet/minecraft/class_9139;
COMMENT {@return a codec that always returns {@code value}}
COMMENT
Expand All @@ -45,7 +52,7 @@ CLASS net/minecraft/class_9139 net/minecraft/network/codec/PacketCodec
COMMENT <p>This can be used to transform a codec for a simple value (like a string)
COMMENT into a corresponding, more complex value (like an identifier). An example:
COMMENT
COMMENT <p><pre>{@code
COMMENT <pre>{@code
COMMENT public static final PacketCodec<ByteBuf, Identifier> PACKET_CODEC = PacketCodecs.STRING.xmap(Identifier::new, Identifier::toString);
COMMENT }</pre>
ARG 1 to
Expand Down Expand Up @@ -83,7 +90,7 @@ CLASS net/minecraft/class_9139 net/minecraft/network/codec/PacketCodec
ARG 4 codec3
ARG 5 from3
ARG 6 to
METHOD method_56437 of (Lnet/minecraft/class_9142;Lnet/minecraft/class_9141;)Lnet/minecraft/class_9139;
METHOD method_56437 ofStatic (Lnet/minecraft/class_9142;Lnet/minecraft/class_9141;)Lnet/minecraft/class_9139;
COMMENT {@return a packet codec from the {@code encoder} and {@code decoder}}
COMMENT
COMMENT @apiNote This is useful for integrating with code that uses static methods for
Expand All @@ -99,7 +106,7 @@ CLASS net/minecraft/class_9139 net/minecraft/network/codec/PacketCodec
COMMENT @apiNote This is useful for integrating with code that uses instance methods for
COMMENT packet writing, like {@code void write(PacketByteBuf buf)}.
COMMENT For code that uses static methods like {@code static void write(PacketByteBuf buf, Data data)},
COMMENT where the buffer is the first argument, use {@link #of(PacketEncoder, PacketDecoder)}.
COMMENT where the buffer is the first argument, use {@link #ofStatic(PacketEncoder, PacketDecoder)}.
ARG 0 encoder
ARG 1 decoder
METHOD method_56439 mapBuf (Ljava/util/function/Function;)Lnet/minecraft/class_9139;
Expand Down
4 changes: 2 additions & 2 deletions mappings/net/minecraft/network/codec/PacketCodecs.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CLASS net/minecraft/class_9135 net/minecraft/network/codec/PacketCodecs
COMMENT @see io.netty.buffer.ByteBuf#readDouble
COMMENT @see io.netty.buffer.ByteBuf#writeDouble
FIELD field_48554 STRING Lnet/minecraft/class_9139;
COMMENT A codec for a string value with maximum length {@value Short.MAX_VALUE}.
COMMENT A codec for a string value with maximum length {@value Short#MAX_VALUE}.
COMMENT
COMMENT @see #string
COMMENT @see net.minecraft.network.PacketByteBuf#readString()
Expand All @@ -61,7 +61,7 @@ CLASS net/minecraft/class_9135 net/minecraft/network/codec/PacketCodecs
COMMENT
COMMENT @see #nbt
COMMENT @see net.minecraft.network.PacketByteBuf#readNbt(PacketByteBuf)
COMMENT @see net.minecraft.network.PacketByteBuf#writeNbt(PacketByteBuf, NbtCompound)
COMMENT @see net.minecraft.network.PacketByteBuf#writeNbt(io.netty.buffer.ByteBuf, NbtElement)
FIELD field_48558 VECTOR3F Lnet/minecraft/class_9139;
COMMENT A codec for a {@link org.joml.Vector3f}.
COMMENT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CLASS net/minecraft/class_2547 net/minecraft/network/listener/PacketListener
COMMENT
COMMENT @see ServerPacketListener
METHOD method_48106 isConnectionOpen ()Z
METHOD method_52280 getState ()Lnet/minecraft/class_2539;
METHOD method_52280 getPhase ()Lnet/minecraft/class_2539;
METHOD method_52413 accepts (Lnet/minecraft/class_2596;)Z
ARG 1 packet
METHOD method_52895 getSide ()Lnet/minecraft/class_2598;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CLASS net/minecraft/class_1866 net/minecraft/recipe/SpecialRecipeSerializer
COMMENT serializer have IDs starting with {@code crafting_special_}. All of their logic and ingredients
COMMENT are also defined in code, which distinguishes them from "non-special" recipes.
FIELD field_46106 codec Lcom/mojang/serialization/Codec;
FIELD field_48362 PACKET_CODEC Lnet/minecraft/class_9139;
FIELD field_48362 packetCodec Lnet/minecraft/class_9139;
FIELD field_9046 factory Lnet/minecraft/class_1866$class_7711;
METHOD <init> (Lnet/minecraft/class_1866$class_7711;)V
ARG 1 factory
Expand Down