mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 11:24:57 -05:00
Bump to 1.21.3 + small optimizations
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
This commit is contained in:
parent
b3df3514c9
commit
53dbc06342
4 changed files with 8 additions and 7 deletions
|
@ -216,7 +216,7 @@ public class MinecraftCodec {
|
|||
public static final PacketCodec CODEC = PacketCodec.builder()
|
||||
.protocolVersion(768)
|
||||
.helper(MinecraftCodecHelper::new)
|
||||
.minecraftVersion("1.21.2")
|
||||
.minecraftVersion("1.21.3")
|
||||
.state(ProtocolState.HANDSHAKE, MinecraftPacketRegistry.builder()
|
||||
.registerServerboundPacket(ClientIntentionPacket.class, ClientIntentionPacket::new)
|
||||
)
|
||||
|
@ -406,7 +406,7 @@ public class MinecraftCodec {
|
|||
.registerServerboundPacket(ServerboundChatSessionUpdatePacket.class, ServerboundChatSessionUpdatePacket::new)
|
||||
.registerServerboundPacket(ServerboundChunkBatchReceivedPacket.class, ServerboundChunkBatchReceivedPacket::new)
|
||||
.registerServerboundPacket(ServerboundClientCommandPacket.class, ServerboundClientCommandPacket::new)
|
||||
.registerServerboundPacket(ServerboundClientTickEndPacket.class, ServerboundClientTickEndPacket::new)
|
||||
.registerServerboundPacket(ServerboundClientTickEndPacket.class, (buf, helper) -> ServerboundClientTickEndPacket.INSTANCE)
|
||||
.registerServerboundPacket(ServerboundClientInformationPacket.class, ServerboundClientInformationPacket::new)
|
||||
.registerServerboundPacket(ServerboundCommandSuggestionPacket.class, ServerboundCommandSuggestionPacket::new)
|
||||
.registerServerboundPacket(ServerboundConfigurationAcknowledgedPacket.class, ServerboundConfigurationAcknowledgedPacket::new)
|
||||
|
|
|
@ -1099,7 +1099,7 @@ public class MinecraftCodecHelper extends BasePacketCodecHelper {
|
|||
RecipeSlotType type = RecipeSlotType.from(this.readVarInt(buf));
|
||||
SlotDisplay display;
|
||||
switch (type) {
|
||||
case EMPTY -> display = new EmptySlotDisplay();
|
||||
case EMPTY -> display = EmptySlotDisplay.INSTANCE;
|
||||
case ANY_FUEL -> display = new AnyFuelSlotDisplay();
|
||||
case ITEM -> display = new ItemSlotDisplay(this.readVarInt(buf));
|
||||
case ITEM_STACK -> display = new ItemStackSlotDisplay(this.readItemStack(buf));
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot;
|
||||
|
||||
public record EmptySlotDisplay() implements SlotDisplay {
|
||||
public static final EmptySlotDisplay INSTANCE = new EmptySlotDisplay();
|
||||
|
||||
@Override
|
||||
public RecipeSlotType getType() {
|
||||
return RecipeSlotType.EMPTY;
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
package org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class ServerboundClientTickEndPacket implements MinecraftPacket {
|
||||
|
||||
public ServerboundClientTickEndPacket(ByteBuf in, MinecraftCodecHelper helper) {
|
||||
}
|
||||
public static final ServerboundClientTickEndPacket INSTANCE = new ServerboundClientTickEndPacket();
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf out, MinecraftCodecHelper helper) {
|
||||
|
|
Loading…
Reference in a new issue