From 7d272ae2d83c574f495f8c1afa4b98f919b35c36 Mon Sep 17 00:00:00 2001 From: Alemiz Date: Mon, 26 Feb 2024 20:44:44 +0100 Subject: [PATCH] Start working on 1.20.70 support --- .../ResourcePacksInfoSerializer_v618.java | 14 ++++- .../bedrock/codec/v649/Bedrock_v649.java | 2 - .../bedrock/codec/v662/Bedrock_v662.java | 56 +++++++++++++++++++ .../LecternUpdateSerializer_v662.java | 27 +++++++++ .../serializer/MobEffectSerializer_v662.java | 23 ++++++++ .../PlayerAuthInputSerializer_v662.java | 36 ++++++++++++ .../ResourcePacksInfoSerializer_v622.java | 35 ++++++++++++ .../SetEntityMotionSerializer_v662.java | 26 +++++++++ .../protocol/bedrock/data/LevelEvent.java | 12 +++- .../protocol/bedrock/data/ParticleType.java | 10 +++- .../bedrock/data/PlayerAuthInputData.java | 10 +++- .../request/TextProcessingEventOrigin.java | 8 ++- .../packet/ItemFrameDropItemPacket.java | 4 ++ .../bedrock/packet/LecternUpdatePacket.java | 4 ++ .../bedrock/packet/MobEffectPacket.java | 4 ++ .../bedrock/packet/PlayerAuthInputPacket.java | 4 ++ .../packet/ResourcePacksInfoPacket.java | 4 ++ .../bedrock/packet/SetEntityMotionPacket.java | 4 ++ 18 files changed, 274 insertions(+), 9 deletions(-) create mode 100644 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/Bedrock_v662.java create mode 100644 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/LecternUpdateSerializer_v662.java create mode 100644 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/MobEffectSerializer_v662.java create mode 100644 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/PlayerAuthInputSerializer_v662.java create mode 100644 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/ResourcePacksInfoSerializer_v622.java create mode 100644 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/SetEntityMotionSerializer_v662.java diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v618/serializer/ResourcePacksInfoSerializer_v618.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v618/serializer/ResourcePacksInfoSerializer_v618.java index 52253131f..d10e753e0 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v618/serializer/ResourcePacksInfoSerializer_v618.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v618/serializer/ResourcePacksInfoSerializer_v618.java @@ -15,15 +15,23 @@ public class ResourcePacksInfoSerializer_v618 extends ResourcePacksInfoSerialize @Override public void serialize(ByteBuf buffer, BedrockCodecHelper helper, ResourcePacksInfoPacket packet) { super.serialize(buffer, helper, packet); + this.writeCDNEntries(buffer, packet, helper); + } + + @Override + public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, ResourcePacksInfoPacket packet) { + super.deserialize(buffer, helper, packet); + this.readCDNEntries(buffer, packet, helper); + } + + protected void writeCDNEntries(ByteBuf buffer, ResourcePacksInfoPacket packet, BedrockCodecHelper helper) { helper.writeArray(buffer, packet.getCDNEntries(), (buf, entry) -> { helper.writeString(buf, entry.getPackId()); helper.writeString(buf, entry.getRemoteUrl()); }); } - @Override - public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, ResourcePacksInfoPacket packet) { - super.deserialize(buffer, helper, packet); + protected void readCDNEntries(ByteBuf buffer, ResourcePacksInfoPacket packet, BedrockCodecHelper helper) { helper.readArray(buffer, packet.getCDNEntries(), buf -> new ResourcePacksInfoPacket.CDNEntry(helper.readString(buf), helper.readString(buf))); } diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v649/Bedrock_v649.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v649/Bedrock_v649.java index 49fbcb56a..3558cc2c7 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v649/Bedrock_v649.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v649/Bedrock_v649.java @@ -47,8 +47,6 @@ public class Bedrock_v649 extends Bedrock_v630 { .insert(500, SoundEvent.UNDEFINED) .build(); - // TODO: check for command params - public static final BedrockCodec CODEC = Bedrock_v630.CODEC.toBuilder() .raknetProtocolVersion(11) .protocolVersion(649) diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/Bedrock_v662.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/Bedrock_v662.java new file mode 100644 index 000000000..5da0631db --- /dev/null +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/Bedrock_v662.java @@ -0,0 +1,56 @@ +package org.cloudburstmc.protocol.bedrock.codec.v662; + +import org.cloudburstmc.protocol.bedrock.codec.BedrockCodec; +import org.cloudburstmc.protocol.bedrock.codec.v291.serializer.LevelEventSerializer_v291; +import org.cloudburstmc.protocol.bedrock.codec.v361.serializer.LevelEventGenericSerializer_v361; +import org.cloudburstmc.protocol.bedrock.codec.v575.BedrockCodecHelper_v575; +import org.cloudburstmc.protocol.bedrock.codec.v649.Bedrock_v649; +import org.cloudburstmc.protocol.bedrock.codec.v662.serializer.*; +import org.cloudburstmc.protocol.bedrock.data.LevelEvent; +import org.cloudburstmc.protocol.bedrock.data.LevelEventType; +import org.cloudburstmc.protocol.bedrock.data.ParticleType; +import org.cloudburstmc.protocol.bedrock.data.inventory.itemstack.request.TextProcessingEventOrigin; +import org.cloudburstmc.protocol.bedrock.packet.*; +import org.cloudburstmc.protocol.common.util.TypeMap; + +public class Bedrock_v662 extends Bedrock_v649 { + + protected static final TypeMap PARTICLE_TYPES = Bedrock_v649.PARTICLE_TYPES + .toBuilder() + .replace(18, ParticleType.BREEZE_WIND_EXPLOSION) + .insert(90, ParticleType.VAULT_CONNECTION) + .insert(91, ParticleType.WIND_EXPLOSION) + .build(); + + protected static final TypeMap LEVEL_EVENTS = Bedrock_v649.LEVEL_EVENTS.toBuilder() + .replace(LEVEL_EVENT_BLOCK + 110, LevelEvent.PARTICLE_BREEZE_WIND_EXPLOSION) + .replace(LEVEL_EVENT_BLOCK + 114, LevelEvent.PARTICLE_WIND_EXPLOSION) + .insert(LEVEL_EVENT_BLOCK + 115, LevelEvent.ALL_PLAYERS_SLEEPING) + .insert(9811, LevelEvent.ANIMATION_VAULT_ACTIVATE) + .insert(9812, LevelEvent.ANIMATION_VAULT_DEACTIVATE) + .insert(9813, LevelEvent.ANIMATION_VAULT_EJECT_ITEM) + .insert(LEVEL_EVENT_PARTICLE_TYPE, PARTICLE_TYPES) + .build(); + + protected static final TypeMap TEXT_PROCESSING_ORIGINS = Bedrock_v649.TEXT_PROCESSING_ORIGINS + .toBuilder() + .replace(14, TextProcessingEventOrigin.SERVER_FORM) // replaces PASS_THROUGH_WITHOUT_SIFT + .build(); + + // TODO: check for command params + + public static final BedrockCodec CODEC = Bedrock_v649.CODEC.toBuilder() + .raknetProtocolVersion(11) + .protocolVersion(662) + .minecraftVersion("1.20.70") + .helper(() -> new BedrockCodecHelper_v575(ENTITY_DATA, GAME_RULE_TYPES, ITEM_STACK_REQUEST_TYPES, CONTAINER_SLOT_TYPES, PLAYER_ABILITIES, TEXT_PROCESSING_ORIGINS)) + .updateSerializer(LevelEventPacket.class, new LevelEventSerializer_v291(LEVEL_EVENTS)) + .updateSerializer(LevelEventGenericPacket.class, new LevelEventGenericSerializer_v361(LEVEL_EVENTS)) + .updateSerializer(LecternUpdatePacket.class, LecternUpdateSerializer_v662.INSTANCE) + .updateSerializer(MobEffectPacket.class, MobEffectSerializer_v662.INSTANCE) + .updateSerializer(PlayerAuthInputPacket.class, new PlayerAuthInputSerializer_v662()) + .updateSerializer(ResourcePacksInfoPacket.class, ResourcePacksInfoSerializer_v622.INSTANCE) + .updateSerializer(SetEntityMotionPacket.class, SetEntityMotionSerializer_v662.INSTANCE) + .deregisterPacket(ItemFrameDropItemPacket.class) // this packet is now deprecated + .build(); +} \ No newline at end of file diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/LecternUpdateSerializer_v662.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/LecternUpdateSerializer_v662.java new file mode 100644 index 000000000..6856c42b7 --- /dev/null +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/LecternUpdateSerializer_v662.java @@ -0,0 +1,27 @@ +package org.cloudburstmc.protocol.bedrock.codec.v662.serializer; + +import io.netty.buffer.ByteBuf; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.cloudburstmc.protocol.bedrock.codec.BedrockCodecHelper; +import org.cloudburstmc.protocol.bedrock.codec.v354.serializer.LecternUpdateSerializer_v354; +import org.cloudburstmc.protocol.bedrock.packet.LecternUpdatePacket; + +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class LecternUpdateSerializer_v662 extends LecternUpdateSerializer_v354 { + public static final LecternUpdateSerializer_v662 INSTANCE = new LecternUpdateSerializer_v662(); + + @Override + public void serialize(ByteBuf buffer, BedrockCodecHelper helper, LecternUpdatePacket packet) { + buffer.writeByte(packet.getPage()); + buffer.writeByte(packet.getTotalPages()); + helper.writeBlockPosition(buffer, packet.getBlockPosition()); + } + + @Override + public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, LecternUpdatePacket packet) { + packet.setPage(buffer.readUnsignedByte()); + packet.setTotalPages(buffer.readUnsignedByte()); + packet.setBlockPosition(helper.readBlockPosition(buffer)); + } +} diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/MobEffectSerializer_v662.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/MobEffectSerializer_v662.java new file mode 100644 index 000000000..a71dbc921 --- /dev/null +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/MobEffectSerializer_v662.java @@ -0,0 +1,23 @@ +package org.cloudburstmc.protocol.bedrock.codec.v662.serializer; + +import io.netty.buffer.ByteBuf; +import org.cloudburstmc.protocol.bedrock.codec.BedrockCodecHelper; +import org.cloudburstmc.protocol.bedrock.codec.v291.serializer.MobEffectSerializer_v291; +import org.cloudburstmc.protocol.bedrock.packet.MobEffectPacket; +import org.cloudburstmc.protocol.common.util.VarInts; + +public class MobEffectSerializer_v662 extends MobEffectSerializer_v291 { + public static final MobEffectSerializer_v662 INSTANCE = new MobEffectSerializer_v662(); + + @Override + public void serialize(ByteBuf buffer, BedrockCodecHelper helper, MobEffectPacket packet) { + super.serialize(buffer, helper, packet); + VarInts.writeUnsignedLong(buffer, packet.getTick()); + } + + @Override + public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, MobEffectPacket packet) { + super.deserialize(buffer, helper, packet); + packet.setTick(VarInts.readUnsignedLong(buffer)); + } +} diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/PlayerAuthInputSerializer_v662.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/PlayerAuthInputSerializer_v662.java new file mode 100644 index 000000000..9ec389ed2 --- /dev/null +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/PlayerAuthInputSerializer_v662.java @@ -0,0 +1,36 @@ +package org.cloudburstmc.protocol.bedrock.codec.v662.serializer; + +import io.netty.buffer.ByteBuf; +import lombok.NoArgsConstructor; +import org.cloudburstmc.protocol.bedrock.codec.BedrockCodecHelper; +import org.cloudburstmc.protocol.bedrock.codec.v527.serializer.PlayerAuthInputSerializer_v527; +import org.cloudburstmc.protocol.bedrock.data.PlayerAuthInputData; +import org.cloudburstmc.protocol.bedrock.packet.PlayerAuthInputPacket; +import org.cloudburstmc.protocol.common.util.VarInts; + +/** + * Use PlayerAuthInputSerializer_v527 here because predictedVehicle was added before analogMoveVector + */ +@NoArgsConstructor +public class PlayerAuthInputSerializer_v662 extends PlayerAuthInputSerializer_v527 { + + @Override + public void serialize(ByteBuf buffer, BedrockCodecHelper helper, PlayerAuthInputPacket packet) { + super.serialize(buffer, helper, packet); + if (packet.getInputData().contains(PlayerAuthInputData.IN_CLIENT_PREDICTED_IN_VEHICLE)) { + helper.writeVector2f(buffer, packet.getVehicleRotation()); + VarInts.writeLong(buffer, packet.getPredictedVehicle()); + } + helper.writeVector2f(buffer, packet.getAnalogMoveVector()); + } + + @Override + public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, PlayerAuthInputPacket packet) { + super.deserialize(buffer, helper, packet); + if (packet.getInputData().contains(PlayerAuthInputData.IN_CLIENT_PREDICTED_IN_VEHICLE)) { + packet.setVehicleRotation(helper.readVector2f(buffer)); + packet.setPredictedVehicle(VarInts.readLong(buffer)); + } + packet.setAnalogMoveVector(helper.readVector2f(buffer)); + } +} diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/ResourcePacksInfoSerializer_v622.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/ResourcePacksInfoSerializer_v622.java new file mode 100644 index 000000000..27f27da5e --- /dev/null +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/ResourcePacksInfoSerializer_v622.java @@ -0,0 +1,35 @@ +package org.cloudburstmc.protocol.bedrock.codec.v662.serializer; + +import io.netty.buffer.ByteBuf; +import lombok.AccessLevel; +import lombok.RequiredArgsConstructor; +import org.cloudburstmc.protocol.bedrock.codec.BedrockCodecHelper; +import org.cloudburstmc.protocol.bedrock.codec.v618.serializer.ResourcePacksInfoSerializer_v618; +import org.cloudburstmc.protocol.bedrock.packet.ResourcePacksInfoPacket; + +@RequiredArgsConstructor(access = AccessLevel.PROTECTED) +public class ResourcePacksInfoSerializer_v622 extends ResourcePacksInfoSerializer_v618 { + public static final ResourcePacksInfoSerializer_v622 INSTANCE = new ResourcePacksInfoSerializer_v622(); + + @Override + public void serialize(ByteBuf buffer, BedrockCodecHelper helper, ResourcePacksInfoPacket packet) { + buffer.writeBoolean(packet.isForcedToAccept()); + buffer.writeBoolean(packet.isHasAddonPacks()); + buffer.writeBoolean(packet.isScriptingEnabled()); + buffer.writeBoolean(packet.isForcingServerPacksEnabled()); + writePacks(buffer, packet.getBehaviorPackInfos(), helper, false); + writePacks(buffer, packet.getResourcePackInfos(), helper, true); + this.writeCDNEntries(buffer, packet, helper); + } + + @Override + public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, ResourcePacksInfoPacket packet) { + packet.setForcedToAccept(buffer.readBoolean()); + packet.setHasAddonPacks(buffer.readBoolean()); + packet.setScriptingEnabled(buffer.readBoolean()); + packet.setForcingServerPacksEnabled(buffer.readBoolean()); + readPacks(buffer, packet.getBehaviorPackInfos(), helper, false); + readPacks(buffer, packet.getResourcePackInfos(), helper, true); + this.readCDNEntries(buffer, packet, helper); + } +} diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/SetEntityMotionSerializer_v662.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/SetEntityMotionSerializer_v662.java new file mode 100644 index 000000000..25ddf70d2 --- /dev/null +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v662/serializer/SetEntityMotionSerializer_v662.java @@ -0,0 +1,26 @@ +package org.cloudburstmc.protocol.bedrock.codec.v662.serializer; + +import io.netty.buffer.ByteBuf; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.cloudburstmc.protocol.bedrock.codec.BedrockCodecHelper; +import org.cloudburstmc.protocol.bedrock.codec.v291.serializer.SetEntityMotionSerializer_v291; +import org.cloudburstmc.protocol.bedrock.packet.SetEntityMotionPacket; +import org.cloudburstmc.protocol.common.util.VarInts; + +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class SetEntityMotionSerializer_v662 extends SetEntityMotionSerializer_v291 { + public static final SetEntityMotionSerializer_v662 INSTANCE = new SetEntityMotionSerializer_v662(); + + @Override + public void serialize(ByteBuf buffer, BedrockCodecHelper helper, SetEntityMotionPacket packet) { + super.serialize(buffer, helper, packet); + VarInts.writeUnsignedLong(buffer, packet.getTick()); + } + + @Override + public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, SetEntityMotionPacket packet) { + super.deserialize(buffer, helper, packet); + packet.setTick(VarInts.readUnsignedLong(buffer)); + } +} diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/LevelEvent.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/LevelEvent.java index fb30e6dac..5ef5f6926 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/LevelEvent.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/LevelEvent.java @@ -95,6 +95,10 @@ public enum LevelEvent implements LevelEventType { PARTICLE_TRAIL_SPAWNER_DETECTION, PARTICLE_TRAIL_SPAWNER_SPAWNING, PARTICLE_TRAIL_SPAWNER_EJECTING, + /** + * @since v662 + */ + PARTICLE_BREEZE_WIND_EXPLOSION, SCULK_CATALYST_BLOOM, SCULK_CHARGE, @@ -141,5 +145,11 @@ public enum LevelEvent implements LevelEventType { ALL_PLAYERS_SLEEPING, SLEEPING_PLAYERS, - JUMP_PREVENTED + JUMP_PREVENTED, + /** + * @since v662 + */ + ANIMATION_VAULT_ACTIVATE, + ANIMATION_VAULT_DEACTIVATE, + ANIMATION_VAULT_EJECT_ITEM, } diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/ParticleType.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/ParticleType.java index 241871263..1b26e5223 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/ParticleType.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/ParticleType.java @@ -105,5 +105,13 @@ public enum ParticleType implements LevelEventType { /** * @since v649 */ - WIND_EXPLOSION + WIND_EXPLOSION, + /** + * @since v662 + */ + BREEZE_WIND_EXPLOSION, + /** + * @since v662 + */ + VAULT_CONNECTION } diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/PlayerAuthInputData.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/PlayerAuthInputData.java index dfe010847..e631a8653 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/PlayerAuthInputData.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/PlayerAuthInputData.java @@ -73,5 +73,13 @@ public enum PlayerAuthInputData { /** * @since v649 */ - IN_CLIENT_PREDICTED_IN_VEHICLE + IN_CLIENT_PREDICTED_IN_VEHICLE, + /** + * @since v662 + */ + PADDLE_LEFT, + /** + * @since v662 + */ + PADDLE_RIGHT } diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/inventory/itemstack/request/TextProcessingEventOrigin.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/inventory/itemstack/request/TextProcessingEventOrigin.java index 48b12be18..f6365062f 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/inventory/itemstack/request/TextProcessingEventOrigin.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/inventory/itemstack/request/TextProcessingEventOrigin.java @@ -39,7 +39,13 @@ public enum TextProcessingEventOrigin { */ SUMMON_COMMAND, /** + * @deprecated since v662 * @since v618 */ - PASS_THROUGH_WITHOUT_SIFT + @Deprecated + PASS_THROUGH_WITHOUT_SIFT, + /** + * @since v662 + */ + SERVER_FORM } \ No newline at end of file diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ItemFrameDropItemPacket.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ItemFrameDropItemPacket.java index 08c9af2e5..a6548d24b 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ItemFrameDropItemPacket.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ItemFrameDropItemPacket.java @@ -6,6 +6,10 @@ import org.cloudburstmc.math.vector.Vector3i; import org.cloudburstmc.protocol.common.PacketSignal; +/** + * Deprecated since v662 + */ +@Deprecated @Data @EqualsAndHashCode(doNotUseGetters = true) @ToString(doNotUseGetters = true) diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/LecternUpdatePacket.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/LecternUpdatePacket.java index 95377ffc1..717c79c34 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/LecternUpdatePacket.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/LecternUpdatePacket.java @@ -13,6 +13,10 @@ public class LecternUpdatePacket implements BedrockPacket { private int page; private int totalPages; private Vector3i blockPosition; + /** + * @deprecated since v662 + */ + @Deprecated private boolean droppingBook; @Override diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/MobEffectPacket.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/MobEffectPacket.java index eba05efe9..2b21e471c 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/MobEffectPacket.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/MobEffectPacket.java @@ -15,6 +15,10 @@ public class MobEffectPacket implements BedrockPacket { private int amplifier; private boolean particles; private int duration; + /** + * @since v662 + */ + private long tick; @Override public final PacketSignal handle(BedrockPacketHandler handler) { diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/PlayerAuthInputPacket.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/PlayerAuthInputPacket.java index 3296de292..6258b958e 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/PlayerAuthInputPacket.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/PlayerAuthInputPacket.java @@ -58,6 +58,10 @@ public class PlayerAuthInputPacket implements BedrockPacket { * @since 649 */ private long predictedVehicle; + /** + * @since 662 + */ + private Vector2f vehicleRotation; @Override public PacketSignal handle(BedrockPacketHandler handler) { diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ResourcePacksInfoPacket.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ResourcePacksInfoPacket.java index 7caba0a06..dc93389cf 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ResourcePacksInfoPacket.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ResourcePacksInfoPacket.java @@ -13,6 +13,10 @@ public class ResourcePacksInfoPacket implements BedrockPacket { private final List behaviorPackInfos = new ObjectArrayList<>(); private final List resourcePackInfos = new ObjectArrayList<>(); private boolean forcedToAccept; + /** + * @since v662 + */ + private boolean hasAddonPacks; private boolean scriptingEnabled; /** * @since v448 diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/SetEntityMotionPacket.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/SetEntityMotionPacket.java index ccc20e182..192067e35 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/SetEntityMotionPacket.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/SetEntityMotionPacket.java @@ -12,6 +12,10 @@ public class SetEntityMotionPacket implements BedrockPacket { private long runtimeEntityId; private Vector3f motion; + /** + * @since v662 + */ + private long tick; @Override public final PacketSignal handle(BedrockPacketHandler handler) {