1#![allow(
9 unused_imports,
10 unused_variables,
11 unused_mut,
12 unused_parens,
13 unused_braces,
14 clippy::all,
15 clippy::pedantic,
16 non_camel_case_types,
17 non_snake_case
18)]
19use crate::codec::{Decode, DecodeResult, Encode, EncodeResult, McWrite, Reader, decode_exact};
20use crate::error::{DecodeError, EncodeError};
21use crate::nbt::{AnonNbt, RawNbt};
22use crate::packet::{Direction, PacketSet, RawPacket, State};
23#[cfg(feature = "testgen")]
24use crate::testgen::{Gen, Generate};
25use crate::types::{BlockPos, ByteString, Holder, HolderSet, LpVec3, PositionLayout, Uuid};
26use bytes::{BufMut, Bytes, BytesMut};
27
28pub mod id {
30 pub const BUNDLE_DELIMITER: i32 = 0x00;
32 pub const SPAWN_ENTITY: i32 = 0x01;
34 pub const ANIMATION: i32 = 0x02;
36 pub const STATISTICS: i32 = 0x03;
38 pub const ACKNOWLEDGE_PLAYER_DIGGING: i32 = 0x04;
40 pub const BLOCK_BREAK_ANIMATION: i32 = 0x05;
42 pub const TILE_ENTITY_DATA: i32 = 0x06;
44 pub const BLOCK_ACTION: i32 = 0x07;
46 pub const BLOCK_CHANGE: i32 = 0x08;
48 pub const BOSS_BAR: i32 = 0x09;
50 pub const DIFFICULTY: i32 = 0x0a;
52 pub const CHUNK_BATCH_FINISHED: i32 = 0x0b;
54 pub const CHUNK_BATCH_START: i32 = 0x0c;
56 pub const CHUNK_BIOMES: i32 = 0x0d;
58 pub const CLEAR_TITLES: i32 = 0x0e;
60 pub const TAB_COMPLETE: i32 = 0x0f;
62 pub const DECLARE_COMMANDS: i32 = 0x10;
64 pub const CLOSE_WINDOW: i32 = 0x11;
66 pub const WINDOW_ITEMS: i32 = 0x12;
68 pub const CRAFT_PROGRESS_BAR: i32 = 0x13;
70 pub const SET_SLOT: i32 = 0x14;
72 pub const COOKIE_REQUEST: i32 = 0x15;
74 pub const SET_COOLDOWN: i32 = 0x16;
76 pub const CHAT_SUGGESTIONS: i32 = 0x17;
78 pub const CUSTOM_PAYLOAD: i32 = 0x18;
80 pub const DAMAGE_EVENT: i32 = 0x19;
82 pub const DEBUG_BLOCK_VALUE: i32 = 0x1a;
84 pub const DEBUG_CHUNK_VALUE: i32 = 0x1b;
86 pub const DEBUG_ENTITY_VALUE: i32 = 0x1c;
88 pub const DEBUG_EVENT: i32 = 0x1d;
90 pub const DEBUG_SAMPLE: i32 = 0x1e;
92 pub const HIDE_MESSAGE: i32 = 0x1f;
94 pub const KICK_DISCONNECT: i32 = 0x20;
96 pub const PROFILELESS_CHAT: i32 = 0x21;
98 pub const ENTITY_STATUS: i32 = 0x22;
100 pub const SYNC_ENTITY_POSITION: i32 = 0x23;
102 pub const EXPLOSION: i32 = 0x24;
104 pub const UNLOAD_CHUNK: i32 = 0x25;
106 pub const GAME_STATE_CHANGE: i32 = 0x26;
108 pub const GAME_RULE_VALUES: i32 = 0x27;
110 pub const GAME_TEST_HIGHLIGHT_POS: i32 = 0x28;
112 pub const OPEN_HORSE_WINDOW: i32 = 0x29;
114 pub const HURT_ANIMATION: i32 = 0x2a;
116 pub const INITIALIZE_WORLD_BORDER: i32 = 0x2b;
118 pub const KEEP_ALIVE: i32 = 0x2c;
120 pub const MAP_CHUNK: i32 = 0x2d;
122 pub const WORLD_EVENT: i32 = 0x2e;
124 pub const WORLD_PARTICLES: i32 = 0x2f;
126 pub const UPDATE_LIGHT: i32 = 0x30;
128 pub const LOGIN: i32 = 0x31;
130 pub const LOW_DISK_SPACE_WARNING: i32 = 0x32;
132 pub const MAP: i32 = 0x33;
134 pub const TRADE_LIST: i32 = 0x34;
136 pub const REL_ENTITY_MOVE: i32 = 0x35;
138 pub const ENTITY_MOVE_LOOK: i32 = 0x36;
140 pub const MOVE_MINECART: i32 = 0x37;
142 pub const ENTITY_LOOK: i32 = 0x38;
144 pub const VEHICLE_MOVE: i32 = 0x39;
146 pub const OPEN_BOOK: i32 = 0x3a;
148 pub const OPEN_WINDOW: i32 = 0x3b;
150 pub const OPEN_SIGN_ENTITY: i32 = 0x3c;
152 pub const PING: i32 = 0x3d;
154 pub const PING_RESPONSE: i32 = 0x3e;
156 pub const CRAFT_RECIPE_RESPONSE: i32 = 0x3f;
158 pub const ABILITIES: i32 = 0x40;
160 pub const PLAYER_CHAT: i32 = 0x41;
162 pub const END_COMBAT_EVENT: i32 = 0x42;
164 pub const ENTER_COMBAT_EVENT: i32 = 0x43;
166 pub const DEATH_COMBAT_EVENT: i32 = 0x44;
168 pub const PLAYER_REMOVE: i32 = 0x45;
170 pub const PLAYER_INFO: i32 = 0x46;
172 pub const FACE_PLAYER: i32 = 0x47;
174 pub const POSITION: i32 = 0x48;
176 pub const PLAYER_ROTATION: i32 = 0x49;
178 pub const RECIPE_BOOK_ADD: i32 = 0x4a;
180 pub const RECIPE_BOOK_REMOVE: i32 = 0x4b;
182 pub const RECIPE_BOOK_SETTINGS: i32 = 0x4c;
184 pub const ENTITY_DESTROY: i32 = 0x4d;
186 pub const REMOVE_ENTITY_EFFECT: i32 = 0x4e;
188 pub const RESET_SCORE: i32 = 0x4f;
190 pub const REMOVE_RESOURCE_PACK: i32 = 0x50;
192 pub const ADD_RESOURCE_PACK: i32 = 0x51;
194 pub const RESPAWN: i32 = 0x52;
196 pub const ENTITY_HEAD_ROTATION: i32 = 0x53;
198 pub const MULTI_BLOCK_CHANGE: i32 = 0x54;
200 pub const SELECT_ADVANCEMENT_TAB: i32 = 0x55;
202 pub const SERVER_DATA: i32 = 0x56;
204 pub const ACTION_BAR: i32 = 0x57;
206 pub const WORLD_BORDER_CENTER: i32 = 0x58;
208 pub const WORLD_BORDER_LERP_SIZE: i32 = 0x59;
210 pub const WORLD_BORDER_SIZE: i32 = 0x5a;
212 pub const WORLD_BORDER_WARNING_DELAY: i32 = 0x5b;
214 pub const WORLD_BORDER_WARNING_REACH: i32 = 0x5c;
216 pub const CAMERA: i32 = 0x5d;
218 pub const UPDATE_VIEW_POSITION: i32 = 0x5e;
220 pub const UPDATE_VIEW_DISTANCE: i32 = 0x5f;
222 pub const SET_CURSOR_ITEM: i32 = 0x60;
224 pub const SPAWN_POSITION: i32 = 0x61;
226 pub const SCOREBOARD_DISPLAY_OBJECTIVE: i32 = 0x62;
228 pub const ENTITY_METADATA: i32 = 0x63;
230 pub const ATTACH_ENTITY: i32 = 0x64;
232 pub const ENTITY_VELOCITY: i32 = 0x65;
234 pub const ENTITY_EQUIPMENT: i32 = 0x66;
236 pub const EXPERIENCE: i32 = 0x67;
238 pub const UPDATE_HEALTH: i32 = 0x68;
240 pub const HELD_ITEM_SLOT: i32 = 0x69;
242 pub const SCOREBOARD_OBJECTIVE: i32 = 0x6a;
244 pub const SET_PASSENGERS: i32 = 0x6b;
246 pub const SET_PLAYER_INVENTORY: i32 = 0x6c;
248 pub const TEAMS: i32 = 0x6d;
250 pub const SCOREBOARD_SCORE: i32 = 0x6e;
252 pub const SIMULATION_DISTANCE: i32 = 0x6f;
254 pub const SET_TITLE_SUBTITLE: i32 = 0x70;
256 pub const UPDATE_TIME: i32 = 0x71;
258 pub const SET_TITLE_TEXT: i32 = 0x72;
260 pub const SET_TITLE_TIME: i32 = 0x73;
262 pub const ENTITY_SOUND_EFFECT: i32 = 0x74;
264 pub const SOUND_EFFECT: i32 = 0x75;
266 pub const START_CONFIGURATION: i32 = 0x76;
268 pub const STOP_SOUND: i32 = 0x77;
270 pub const STORE_COOKIE: i32 = 0x78;
272 pub const SYSTEM_CHAT: i32 = 0x79;
274 pub const PLAYERLIST_HEADER: i32 = 0x7a;
276 pub const NBT_QUERY_RESPONSE: i32 = 0x7b;
278 pub const COLLECT: i32 = 0x7c;
280 pub const ENTITY_TELEPORT: i32 = 0x7d;
282 pub const TEST_INSTANCE_BLOCK_STATUS: i32 = 0x7e;
284 pub const SET_TICKING_STATE: i32 = 0x7f;
286 pub const STEP_TICK: i32 = 0x80;
288 pub const TRANSFER: i32 = 0x81;
290 pub const ADVANCEMENTS: i32 = 0x82;
292 pub const ENTITY_UPDATE_ATTRIBUTES: i32 = 0x83;
294 pub const ENTITY_EFFECT: i32 = 0x84;
296 pub const DECLARE_RECIPES: i32 = 0x85;
298 pub const TAGS: i32 = 0x86;
300 pub const SET_PROJECTILE_POWER: i32 = 0x87;
302 pub const CUSTOM_REPORT_DETAILS: i32 = 0x88;
304 pub const SERVER_LINKS: i32 = 0x89;
306 pub const TRACKED_WAYPOINT: i32 = 0x8a;
308 pub const CLEAR_DIALOG: i32 = 0x8b;
310 pub const SHOW_DIALOG: i32 = 0x8c;
312}
313
314pub use crate::defs::p340::play::clientbound::AdvancementsProgressMapping;
315pub use crate::defs::p340::play::clientbound::AdvancementsProgressMappingValue;
316pub use crate::defs::p754::play::clientbound::StatisticsEntries;
317pub use crate::defs::p775::play::clientbound::AdvancementsAdvancementMapping;
318pub use crate::defs::p775::play::clientbound::AdvancementsAdvancementMappingValue;
319pub use crate::defs::p775::play::clientbound::AdvancementsAdvancementMappingValueDisplayData;
320pub use crate::defs::p775::play::clientbound::AdvancementsAdvancementMappingValueDisplayDataFlags;
321pub use crate::defs::p775::play::clientbound::ChatType;
322pub use crate::defs::p775::play::clientbound::ChatTypeParameterType;
323pub use crate::defs::p775::play::clientbound::ChatTypes;
324pub use crate::defs::p775::play::clientbound::ChunkBiomesBiomes;
325pub use crate::defs::p775::play::clientbound::CustomReportDetailsDetails;
326pub use crate::defs::p775::play::clientbound::DeclareRecipesRecipes;
327pub use crate::defs::p775::play::clientbound::DeclareRecipesStoneCutterRecipes;
328pub use crate::defs::p775::play::clientbound::DifficultyDifficulty;
329pub use crate::defs::p775::play::clientbound::EntityEquipmentEquipments;
330pub use crate::defs::p775::play::clientbound::EntityUpdateAttributesProperties;
331pub use crate::defs::p775::play::clientbound::EntityUpdateAttributesPropertiesKey;
332pub use crate::defs::p775::play::clientbound::EntityUpdateAttributesPropertiesModifiers;
333pub use crate::defs::p775::play::clientbound::ExplosionParticleEntry;
334pub use crate::defs::p775::play::clientbound::ExplosionParticleInfo;
335pub use crate::defs::p775::play::clientbound::GameStateChangeReason;
336pub use crate::defs::p775::play::clientbound::MapChunkHeightmaps;
337pub use crate::defs::p775::play::clientbound::MapChunkHeightmapsType;
338pub use crate::defs::p775::play::clientbound::MapIcons;
339pub use crate::defs::p775::play::clientbound::MoveMinecartSteps;
340pub use crate::defs::p775::play::clientbound::MultiBlockChangeChunkCoordinates;
341pub use crate::defs::p775::play::clientbound::OpenBookHand;
342pub use crate::defs::p775::play::clientbound::PlayerInfoAction;
343pub use crate::defs::p775::play::clientbound::PlayerInfoData;
344pub use crate::defs::p775::play::clientbound::PositionUpdateRelatives;
345pub use crate::defs::p775::play::clientbound::RecipeBookAddEntries;
346pub use crate::defs::p775::play::clientbound::RecipeBookAddEntriesFlags;
347pub use crate::defs::p775::play::clientbound::RecipeBookAddEntriesRecipe;
348pub use crate::defs::p775::play::clientbound::RecipeBookAddEntriesRecipeCategory;
349pub use crate::defs::p775::play::clientbound::RecipeBookSetting;
350pub use crate::defs::p775::play::clientbound::RecipeDisplay;
351pub use crate::defs::p775::play::clientbound::RecipeDisplayData;
352pub use crate::defs::p775::play::clientbound::RecipeDisplayDataCraftingShaped;
353pub use crate::defs::p775::play::clientbound::RecipeDisplayDataCraftingShapeless;
354pub use crate::defs::p775::play::clientbound::RecipeDisplayDataFurnace;
355pub use crate::defs::p775::play::clientbound::RecipeDisplayDataSmithing;
356pub use crate::defs::p775::play::clientbound::RecipeDisplayDataStonecutter;
357pub use crate::defs::p775::play::clientbound::RecipeDisplayType;
358pub use crate::defs::p775::play::clientbound::ServerLinksLinks;
359pub use crate::defs::p775::play::clientbound::SlotDisplay;
360pub use crate::defs::p775::play::clientbound::SlotDisplayData;
361pub use crate::defs::p775::play::clientbound::SlotDisplayDataDyedSlotDemo;
362pub use crate::defs::p775::play::clientbound::SlotDisplayDataOnlyWithComponent;
363pub use crate::defs::p775::play::clientbound::SlotDisplayDataSmithingTrim;
364pub use crate::defs::p775::play::clientbound::SlotDisplayDataWithAnyPotion;
365pub use crate::defs::p775::play::clientbound::SlotDisplayDataWithRemainder;
366pub use crate::defs::p775::play::clientbound::SlotDisplayType;
367pub use crate::defs::p775::play::clientbound::SpawnInfo;
368pub use crate::defs::p775::play::clientbound::SpawnInfoGamemode;
369pub use crate::defs::p775::play::clientbound::TabCompleteMatches;
370pub use crate::defs::p775::play::clientbound::TagsTags;
371pub use crate::defs::p775::play::clientbound::TeamsBodyAdd;
372pub use crate::defs::p775::play::clientbound::TeamsBodyAddCollisionRule;
373pub use crate::defs::p775::play::clientbound::TeamsBodyAddFlags;
374pub use crate::defs::p775::play::clientbound::TeamsBodyAddNameTagVisibility;
375pub use crate::defs::p775::play::clientbound::TeamsMode;
376pub use crate::defs::p775::play::clientbound::TrackedWaypointOperation;
377pub use crate::defs::p775::play::clientbound::TrackedWaypointWaypoint;
378pub use crate::defs::p775::play::clientbound::TrackedWaypointWaypointBody;
379pub use crate::defs::p775::play::clientbound::TrackedWaypointWaypointBodyFalse;
380pub use crate::defs::p775::play::clientbound::TrackedWaypointWaypointBodyTrue;
381pub use crate::defs::p775::play::clientbound::TrackedWaypointWaypointData;
382pub use crate::defs::p775::play::clientbound::TrackedWaypointWaypointDataChunk;
383pub use crate::defs::p775::play::clientbound::TrackedWaypointWaypointIcon;
384pub use crate::defs::p775::play::clientbound::TrackedWaypointWaypointIconColor;
385pub use crate::defs::p775::play::clientbound::TrackedWaypointWaypointType;
386pub use crate::defs::p775::play::clientbound::TradeListTrades;
387pub use crate::defs::p775::play::clientbound::TradeListTradesInputItem1;
388pub use crate::defs::p775::play::clientbound::TradeListTradesInputItem2;
389pub use crate::defs::p775::play::clientbound::UpdateTimeClockUpdates;
390
391pub type BundleDelimiter = crate::defs::p775::play::clientbound::BundleDelimiter<775>;
393impl crate::packet::Packet for BundleDelimiter {
394 const ID: i32 = id::BUNDLE_DELIMITER;
395 const NAME: &'static str = "bundle_delimiter";
396 const STATE: State = State::Play;
397 const DIRECTION: Direction = Direction::Clientbound;
398}
399impl From<BundleDelimiter> for ClientboundPlayPacket {
400 fn from(p: BundleDelimiter) -> Self {
401 Self::BundleDelimiter(p)
402 }
403}
404
405pub type SpawnEntity = crate::defs::p775::play::clientbound::SpawnEntity<775>;
407impl crate::packet::Packet for SpawnEntity {
408 const ID: i32 = id::SPAWN_ENTITY;
409 const NAME: &'static str = "spawn_entity";
410 const STATE: State = State::Play;
411 const DIRECTION: Direction = Direction::Clientbound;
412}
413impl From<SpawnEntity> for ClientboundPlayPacket {
414 fn from(p: SpawnEntity) -> Self {
415 Self::SpawnEntity(p)
416 }
417}
418
419pub type Animation = crate::defs::p47::play::clientbound::Animation<775>;
421impl crate::packet::Packet for Animation {
422 const ID: i32 = id::ANIMATION;
423 const NAME: &'static str = "animation";
424 const STATE: State = State::Play;
425 const DIRECTION: Direction = Direction::Clientbound;
426}
427impl From<Animation> for ClientboundPlayPacket {
428 fn from(p: Animation) -> Self {
429 Self::Animation(p)
430 }
431}
432
433pub type Statistics = crate::defs::p754::play::clientbound::Statistics<775>;
435impl crate::packet::Packet for Statistics {
436 const ID: i32 = id::STATISTICS;
437 const NAME: &'static str = "statistics";
438 const STATE: State = State::Play;
439 const DIRECTION: Direction = Direction::Clientbound;
440}
441impl From<Statistics> for ClientboundPlayPacket {
442 fn from(p: Statistics) -> Self {
443 Self::Statistics(p)
444 }
445}
446
447pub type AcknowledgePlayerDigging =
449 crate::defs::p775::play::clientbound::AcknowledgePlayerDigging<775>;
450impl crate::packet::Packet for AcknowledgePlayerDigging {
451 const ID: i32 = id::ACKNOWLEDGE_PLAYER_DIGGING;
452 const NAME: &'static str = "acknowledge_player_digging";
453 const STATE: State = State::Play;
454 const DIRECTION: Direction = Direction::Clientbound;
455}
456impl From<AcknowledgePlayerDigging> for ClientboundPlayPacket {
457 fn from(p: AcknowledgePlayerDigging) -> Self {
458 Self::AcknowledgePlayerDigging(p)
459 }
460}
461
462pub type BlockBreakAnimation = crate::defs::p754::play::clientbound::BlockBreakAnimation<775>;
464impl crate::packet::Packet for BlockBreakAnimation {
465 const ID: i32 = id::BLOCK_BREAK_ANIMATION;
466 const NAME: &'static str = "block_break_animation";
467 const STATE: State = State::Play;
468 const DIRECTION: Direction = Direction::Clientbound;
469}
470impl From<BlockBreakAnimation> for ClientboundPlayPacket {
471 fn from(p: BlockBreakAnimation) -> Self {
472 Self::BlockBreakAnimation(p)
473 }
474}
475
476pub type TileEntityData = crate::defs::p775::play::clientbound::TileEntityData<775>;
478impl crate::packet::Packet for TileEntityData {
479 const ID: i32 = id::TILE_ENTITY_DATA;
480 const NAME: &'static str = "tile_entity_data";
481 const STATE: State = State::Play;
482 const DIRECTION: Direction = Direction::Clientbound;
483}
484impl From<TileEntityData> for ClientboundPlayPacket {
485 fn from(p: TileEntityData) -> Self {
486 Self::TileEntityData(p)
487 }
488}
489
490pub type BlockAction = crate::defs::p754::play::clientbound::BlockAction<775>;
492impl crate::packet::Packet for BlockAction {
493 const ID: i32 = id::BLOCK_ACTION;
494 const NAME: &'static str = "block_action";
495 const STATE: State = State::Play;
496 const DIRECTION: Direction = Direction::Clientbound;
497}
498impl From<BlockAction> for ClientboundPlayPacket {
499 fn from(p: BlockAction) -> Self {
500 Self::BlockAction(p)
501 }
502}
503
504pub type BlockChange = crate::defs::p754::play::clientbound::BlockChange<775>;
506impl crate::packet::Packet for BlockChange {
507 const ID: i32 = id::BLOCK_CHANGE;
508 const NAME: &'static str = "block_change";
509 const STATE: State = State::Play;
510 const DIRECTION: Direction = Direction::Clientbound;
511}
512impl From<BlockChange> for ClientboundPlayPacket {
513 fn from(p: BlockChange) -> Self {
514 Self::BlockChange(p)
515 }
516}
517
518pub type BossBar = crate::defs::p775::play::clientbound::BossBar<775>;
520impl crate::packet::Packet for BossBar {
521 const ID: i32 = id::BOSS_BAR;
522 const NAME: &'static str = "boss_bar";
523 const STATE: State = State::Play;
524 const DIRECTION: Direction = Direction::Clientbound;
525}
526impl From<BossBar> for ClientboundPlayPacket {
527 fn from(p: BossBar) -> Self {
528 Self::BossBar(p)
529 }
530}
531
532pub type Difficulty = crate::defs::p775::play::clientbound::Difficulty<775>;
534impl crate::packet::Packet for Difficulty {
535 const ID: i32 = id::DIFFICULTY;
536 const NAME: &'static str = "difficulty";
537 const STATE: State = State::Play;
538 const DIRECTION: Direction = Direction::Clientbound;
539}
540impl From<Difficulty> for ClientboundPlayPacket {
541 fn from(p: Difficulty) -> Self {
542 Self::Difficulty(p)
543 }
544}
545
546pub type ChunkBatchFinished = crate::defs::p775::play::clientbound::ChunkBatchFinished<775>;
548impl crate::packet::Packet for ChunkBatchFinished {
549 const ID: i32 = id::CHUNK_BATCH_FINISHED;
550 const NAME: &'static str = "chunk_batch_finished";
551 const STATE: State = State::Play;
552 const DIRECTION: Direction = Direction::Clientbound;
553}
554impl From<ChunkBatchFinished> for ClientboundPlayPacket {
555 fn from(p: ChunkBatchFinished) -> Self {
556 Self::ChunkBatchFinished(p)
557 }
558}
559
560pub type ChunkBatchStart = crate::defs::p775::play::clientbound::ChunkBatchStart<775>;
562impl crate::packet::Packet for ChunkBatchStart {
563 const ID: i32 = id::CHUNK_BATCH_START;
564 const NAME: &'static str = "chunk_batch_start";
565 const STATE: State = State::Play;
566 const DIRECTION: Direction = Direction::Clientbound;
567}
568impl From<ChunkBatchStart> for ClientboundPlayPacket {
569 fn from(p: ChunkBatchStart) -> Self {
570 Self::ChunkBatchStart(p)
571 }
572}
573
574pub type ChunkBiomes = crate::defs::p775::play::clientbound::ChunkBiomes<775>;
576impl crate::packet::Packet for ChunkBiomes {
577 const ID: i32 = id::CHUNK_BIOMES;
578 const NAME: &'static str = "chunk_biomes";
579 const STATE: State = State::Play;
580 const DIRECTION: Direction = Direction::Clientbound;
581}
582impl From<ChunkBiomes> for ClientboundPlayPacket {
583 fn from(p: ChunkBiomes) -> Self {
584 Self::ChunkBiomes(p)
585 }
586}
587
588pub type ClearTitles = crate::defs::p775::play::clientbound::ClearTitles<775>;
590impl crate::packet::Packet for ClearTitles {
591 const ID: i32 = id::CLEAR_TITLES;
592 const NAME: &'static str = "clear_titles";
593 const STATE: State = State::Play;
594 const DIRECTION: Direction = Direction::Clientbound;
595}
596impl From<ClearTitles> for ClientboundPlayPacket {
597 fn from(p: ClearTitles) -> Self {
598 Self::ClearTitles(p)
599 }
600}
601
602pub type TabComplete = crate::defs::p775::play::clientbound::TabComplete<775>;
604impl crate::packet::Packet for TabComplete {
605 const ID: i32 = id::TAB_COMPLETE;
606 const NAME: &'static str = "tab_complete";
607 const STATE: State = State::Play;
608 const DIRECTION: Direction = Direction::Clientbound;
609}
610impl From<TabComplete> for ClientboundPlayPacket {
611 fn from(p: TabComplete) -> Self {
612 Self::TabComplete(p)
613 }
614}
615
616pub type DeclareCommands = crate::defs::p775::play::clientbound::DeclareCommands<775>;
618impl crate::packet::Packet for DeclareCommands {
619 const ID: i32 = id::DECLARE_COMMANDS;
620 const NAME: &'static str = "declare_commands";
621 const STATE: State = State::Play;
622 const DIRECTION: Direction = Direction::Clientbound;
623}
624impl From<DeclareCommands> for ClientboundPlayPacket {
625 fn from(p: DeclareCommands) -> Self {
626 Self::DeclareCommands(p)
627 }
628}
629
630pub type CloseWindow = crate::defs::p775::play::clientbound::CloseWindow<775>;
632impl crate::packet::Packet for CloseWindow {
633 const ID: i32 = id::CLOSE_WINDOW;
634 const NAME: &'static str = "close_window";
635 const STATE: State = State::Play;
636 const DIRECTION: Direction = Direction::Clientbound;
637}
638impl From<CloseWindow> for ClientboundPlayPacket {
639 fn from(p: CloseWindow) -> Self {
640 Self::CloseWindow(p)
641 }
642}
643
644pub type WindowItems = crate::defs::p775::play::clientbound::WindowItems<775>;
646impl crate::packet::Packet for WindowItems {
647 const ID: i32 = id::WINDOW_ITEMS;
648 const NAME: &'static str = "window_items";
649 const STATE: State = State::Play;
650 const DIRECTION: Direction = Direction::Clientbound;
651}
652impl From<WindowItems> for ClientboundPlayPacket {
653 fn from(p: WindowItems) -> Self {
654 Self::WindowItems(p)
655 }
656}
657
658pub type CraftProgressBar = crate::defs::p775::play::clientbound::CraftProgressBar<775>;
660impl crate::packet::Packet for CraftProgressBar {
661 const ID: i32 = id::CRAFT_PROGRESS_BAR;
662 const NAME: &'static str = "craft_progress_bar";
663 const STATE: State = State::Play;
664 const DIRECTION: Direction = Direction::Clientbound;
665}
666impl From<CraftProgressBar> for ClientboundPlayPacket {
667 fn from(p: CraftProgressBar) -> Self {
668 Self::CraftProgressBar(p)
669 }
670}
671
672pub type SetSlot = crate::defs::p775::play::clientbound::SetSlot<775>;
674impl crate::packet::Packet for SetSlot {
675 const ID: i32 = id::SET_SLOT;
676 const NAME: &'static str = "set_slot";
677 const STATE: State = State::Play;
678 const DIRECTION: Direction = Direction::Clientbound;
679}
680impl From<SetSlot> for ClientboundPlayPacket {
681 fn from(p: SetSlot) -> Self {
682 Self::SetSlot(p)
683 }
684}
685
686pub type CookieRequest = crate::defs::p775::play::clientbound::CookieRequest<775>;
688impl crate::packet::Packet for CookieRequest {
689 const ID: i32 = id::COOKIE_REQUEST;
690 const NAME: &'static str = "cookie_request";
691 const STATE: State = State::Play;
692 const DIRECTION: Direction = Direction::Clientbound;
693}
694impl From<CookieRequest> for ClientboundPlayPacket {
695 fn from(p: CookieRequest) -> Self {
696 Self::CookieRequest(p)
697 }
698}
699
700pub type SetCooldown = crate::defs::p775::play::clientbound::SetCooldown<775>;
702impl crate::packet::Packet for SetCooldown {
703 const ID: i32 = id::SET_COOLDOWN;
704 const NAME: &'static str = "set_cooldown";
705 const STATE: State = State::Play;
706 const DIRECTION: Direction = Direction::Clientbound;
707}
708impl From<SetCooldown> for ClientboundPlayPacket {
709 fn from(p: SetCooldown) -> Self {
710 Self::SetCooldown(p)
711 }
712}
713
714pub type ChatSuggestions = crate::defs::p775::play::clientbound::ChatSuggestions<775>;
716impl crate::packet::Packet for ChatSuggestions {
717 const ID: i32 = id::CHAT_SUGGESTIONS;
718 const NAME: &'static str = "chat_suggestions";
719 const STATE: State = State::Play;
720 const DIRECTION: Direction = Direction::Clientbound;
721}
722impl From<ChatSuggestions> for ClientboundPlayPacket {
723 fn from(p: ChatSuggestions) -> Self {
724 Self::ChatSuggestions(p)
725 }
726}
727
728pub type CustomPayload = crate::defs::p47::play::clientbound::CustomPayload<775>;
730impl crate::packet::Packet for CustomPayload {
731 const ID: i32 = id::CUSTOM_PAYLOAD;
732 const NAME: &'static str = "custom_payload";
733 const STATE: State = State::Play;
734 const DIRECTION: Direction = Direction::Clientbound;
735}
736impl From<CustomPayload> for ClientboundPlayPacket {
737 fn from(p: CustomPayload) -> Self {
738 Self::CustomPayload(p)
739 }
740}
741
742pub type DamageEvent = crate::defs::p775::play::clientbound::DamageEvent<775>;
744impl crate::packet::Packet for DamageEvent {
745 const ID: i32 = id::DAMAGE_EVENT;
746 const NAME: &'static str = "damage_event";
747 const STATE: State = State::Play;
748 const DIRECTION: Direction = Direction::Clientbound;
749}
750impl From<DamageEvent> for ClientboundPlayPacket {
751 fn from(p: DamageEvent) -> Self {
752 Self::DamageEvent(p)
753 }
754}
755
756pub type DebugBlockValue = crate::defs::p775::play::clientbound::DebugBlockValue<775>;
758impl crate::packet::Packet for DebugBlockValue {
759 const ID: i32 = id::DEBUG_BLOCK_VALUE;
760 const NAME: &'static str = "debug_block_value";
761 const STATE: State = State::Play;
762 const DIRECTION: Direction = Direction::Clientbound;
763}
764impl From<DebugBlockValue> for ClientboundPlayPacket {
765 fn from(p: DebugBlockValue) -> Self {
766 Self::DebugBlockValue(p)
767 }
768}
769
770pub type DebugChunkValue = crate::defs::p775::play::clientbound::DebugChunkValue<775>;
772impl crate::packet::Packet for DebugChunkValue {
773 const ID: i32 = id::DEBUG_CHUNK_VALUE;
774 const NAME: &'static str = "debug_chunk_value";
775 const STATE: State = State::Play;
776 const DIRECTION: Direction = Direction::Clientbound;
777}
778impl From<DebugChunkValue> for ClientboundPlayPacket {
779 fn from(p: DebugChunkValue) -> Self {
780 Self::DebugChunkValue(p)
781 }
782}
783
784pub type DebugEntityValue = crate::defs::p775::play::clientbound::DebugEntityValue<775>;
786impl crate::packet::Packet for DebugEntityValue {
787 const ID: i32 = id::DEBUG_ENTITY_VALUE;
788 const NAME: &'static str = "debug_entity_value";
789 const STATE: State = State::Play;
790 const DIRECTION: Direction = Direction::Clientbound;
791}
792impl From<DebugEntityValue> for ClientboundPlayPacket {
793 fn from(p: DebugEntityValue) -> Self {
794 Self::DebugEntityValue(p)
795 }
796}
797
798pub type DebugEvent = crate::defs::p775::play::clientbound::DebugEvent<775>;
800impl crate::packet::Packet for DebugEvent {
801 const ID: i32 = id::DEBUG_EVENT;
802 const NAME: &'static str = "debug_event";
803 const STATE: State = State::Play;
804 const DIRECTION: Direction = Direction::Clientbound;
805}
806impl From<DebugEvent> for ClientboundPlayPacket {
807 fn from(p: DebugEvent) -> Self {
808 Self::DebugEvent(p)
809 }
810}
811
812pub type DebugSample = crate::defs::p775::play::clientbound::DebugSample<775>;
814impl crate::packet::Packet for DebugSample {
815 const ID: i32 = id::DEBUG_SAMPLE;
816 const NAME: &'static str = "debug_sample";
817 const STATE: State = State::Play;
818 const DIRECTION: Direction = Direction::Clientbound;
819}
820impl From<DebugSample> for ClientboundPlayPacket {
821 fn from(p: DebugSample) -> Self {
822 Self::DebugSample(p)
823 }
824}
825
826pub type HideMessage = crate::defs::p775::play::clientbound::HideMessage<775>;
828impl crate::packet::Packet for HideMessage {
829 const ID: i32 = id::HIDE_MESSAGE;
830 const NAME: &'static str = "hide_message";
831 const STATE: State = State::Play;
832 const DIRECTION: Direction = Direction::Clientbound;
833}
834impl From<HideMessage> for ClientboundPlayPacket {
835 fn from(p: HideMessage) -> Self {
836 Self::HideMessage(p)
837 }
838}
839
840pub type KickDisconnect = crate::defs::p775::play::clientbound::KickDisconnect<775>;
842impl crate::packet::Packet for KickDisconnect {
843 const ID: i32 = id::KICK_DISCONNECT;
844 const NAME: &'static str = "kick_disconnect";
845 const STATE: State = State::Play;
846 const DIRECTION: Direction = Direction::Clientbound;
847}
848impl From<KickDisconnect> for ClientboundPlayPacket {
849 fn from(p: KickDisconnect) -> Self {
850 Self::KickDisconnect(p)
851 }
852}
853
854pub type ProfilelessChat = crate::defs::p775::play::clientbound::ProfilelessChat<775>;
856impl crate::packet::Packet for ProfilelessChat {
857 const ID: i32 = id::PROFILELESS_CHAT;
858 const NAME: &'static str = "profileless_chat";
859 const STATE: State = State::Play;
860 const DIRECTION: Direction = Direction::Clientbound;
861}
862impl From<ProfilelessChat> for ClientboundPlayPacket {
863 fn from(p: ProfilelessChat) -> Self {
864 Self::ProfilelessChat(p)
865 }
866}
867
868pub type EntityStatus = crate::defs::p47::play::clientbound::EntityStatus<775>;
870impl crate::packet::Packet for EntityStatus {
871 const ID: i32 = id::ENTITY_STATUS;
872 const NAME: &'static str = "entity_status";
873 const STATE: State = State::Play;
874 const DIRECTION: Direction = Direction::Clientbound;
875}
876impl From<EntityStatus> for ClientboundPlayPacket {
877 fn from(p: EntityStatus) -> Self {
878 Self::EntityStatus(p)
879 }
880}
881
882pub type SyncEntityPosition = crate::defs::p775::play::clientbound::SyncEntityPosition<775>;
884impl crate::packet::Packet for SyncEntityPosition {
885 const ID: i32 = id::SYNC_ENTITY_POSITION;
886 const NAME: &'static str = "sync_entity_position";
887 const STATE: State = State::Play;
888 const DIRECTION: Direction = Direction::Clientbound;
889}
890impl From<SyncEntityPosition> for ClientboundPlayPacket {
891 fn from(p: SyncEntityPosition) -> Self {
892 Self::SyncEntityPosition(p)
893 }
894}
895
896pub type Explosion = crate::defs::p775::play::clientbound::Explosion<775>;
898impl crate::packet::Packet for Explosion {
899 const ID: i32 = id::EXPLOSION;
900 const NAME: &'static str = "explosion";
901 const STATE: State = State::Play;
902 const DIRECTION: Direction = Direction::Clientbound;
903}
904impl From<Explosion> for ClientboundPlayPacket {
905 fn from(p: Explosion) -> Self {
906 Self::Explosion(p)
907 }
908}
909
910pub type UnloadChunk = crate::defs::p775::play::clientbound::UnloadChunk<775>;
912impl crate::packet::Packet for UnloadChunk {
913 const ID: i32 = id::UNLOAD_CHUNK;
914 const NAME: &'static str = "unload_chunk";
915 const STATE: State = State::Play;
916 const DIRECTION: Direction = Direction::Clientbound;
917}
918impl From<UnloadChunk> for ClientboundPlayPacket {
919 fn from(p: UnloadChunk) -> Self {
920 Self::UnloadChunk(p)
921 }
922}
923
924pub type GameStateChange = crate::defs::p775::play::clientbound::GameStateChange<775>;
926impl crate::packet::Packet for GameStateChange {
927 const ID: i32 = id::GAME_STATE_CHANGE;
928 const NAME: &'static str = "game_state_change";
929 const STATE: State = State::Play;
930 const DIRECTION: Direction = Direction::Clientbound;
931}
932impl From<GameStateChange> for ClientboundPlayPacket {
933 fn from(p: GameStateChange) -> Self {
934 Self::GameStateChange(p)
935 }
936}
937
938pub type GameRuleValues = crate::defs::p775::play::clientbound::GameRuleValues<775>;
940impl crate::packet::Packet for GameRuleValues {
941 const ID: i32 = id::GAME_RULE_VALUES;
942 const NAME: &'static str = "game_rule_values";
943 const STATE: State = State::Play;
944 const DIRECTION: Direction = Direction::Clientbound;
945}
946impl From<GameRuleValues> for ClientboundPlayPacket {
947 fn from(p: GameRuleValues) -> Self {
948 Self::GameRuleValues(p)
949 }
950}
951
952pub type GameTestHighlightPos = crate::defs::p775::play::clientbound::GameTestHighlightPos<775>;
954impl crate::packet::Packet for GameTestHighlightPos {
955 const ID: i32 = id::GAME_TEST_HIGHLIGHT_POS;
956 const NAME: &'static str = "game_test_highlight_pos";
957 const STATE: State = State::Play;
958 const DIRECTION: Direction = Direction::Clientbound;
959}
960impl From<GameTestHighlightPos> for ClientboundPlayPacket {
961 fn from(p: GameTestHighlightPos) -> Self {
962 Self::GameTestHighlightPos(p)
963 }
964}
965
966pub type OpenHorseWindow = crate::defs::p775::play::clientbound::OpenHorseWindow<775>;
968impl crate::packet::Packet for OpenHorseWindow {
969 const ID: i32 = id::OPEN_HORSE_WINDOW;
970 const NAME: &'static str = "open_horse_window";
971 const STATE: State = State::Play;
972 const DIRECTION: Direction = Direction::Clientbound;
973}
974impl From<OpenHorseWindow> for ClientboundPlayPacket {
975 fn from(p: OpenHorseWindow) -> Self {
976 Self::OpenHorseWindow(p)
977 }
978}
979
980pub type HurtAnimation = crate::defs::p775::play::clientbound::HurtAnimation<775>;
982impl crate::packet::Packet for HurtAnimation {
983 const ID: i32 = id::HURT_ANIMATION;
984 const NAME: &'static str = "hurt_animation";
985 const STATE: State = State::Play;
986 const DIRECTION: Direction = Direction::Clientbound;
987}
988impl From<HurtAnimation> for ClientboundPlayPacket {
989 fn from(p: HurtAnimation) -> Self {
990 Self::HurtAnimation(p)
991 }
992}
993
994pub type InitializeWorldBorder = crate::defs::p775::play::clientbound::InitializeWorldBorder<775>;
996impl crate::packet::Packet for InitializeWorldBorder {
997 const ID: i32 = id::INITIALIZE_WORLD_BORDER;
998 const NAME: &'static str = "initialize_world_border";
999 const STATE: State = State::Play;
1000 const DIRECTION: Direction = Direction::Clientbound;
1001}
1002impl From<InitializeWorldBorder> for ClientboundPlayPacket {
1003 fn from(p: InitializeWorldBorder) -> Self {
1004 Self::InitializeWorldBorder(p)
1005 }
1006}
1007
1008pub type KeepAlive = crate::defs::p340::play::clientbound::KeepAlive<775>;
1010impl crate::packet::Packet for KeepAlive {
1011 const ID: i32 = id::KEEP_ALIVE;
1012 const NAME: &'static str = "keep_alive";
1013 const STATE: State = State::Play;
1014 const DIRECTION: Direction = Direction::Clientbound;
1015}
1016impl From<KeepAlive> for ClientboundPlayPacket {
1017 fn from(p: KeepAlive) -> Self {
1018 Self::KeepAlive(p)
1019 }
1020}
1021
1022pub type MapChunk = crate::defs::p775::play::clientbound::MapChunk<775>;
1024impl crate::packet::Packet for MapChunk {
1025 const ID: i32 = id::MAP_CHUNK;
1026 const NAME: &'static str = "map_chunk";
1027 const STATE: State = State::Play;
1028 const DIRECTION: Direction = Direction::Clientbound;
1029}
1030impl From<MapChunk> for ClientboundPlayPacket {
1031 fn from(p: MapChunk) -> Self {
1032 Self::MapChunk(p)
1033 }
1034}
1035
1036pub type WorldEvent = crate::defs::p754::play::clientbound::WorldEvent<775>;
1038impl crate::packet::Packet for WorldEvent {
1039 const ID: i32 = id::WORLD_EVENT;
1040 const NAME: &'static str = "world_event";
1041 const STATE: State = State::Play;
1042 const DIRECTION: Direction = Direction::Clientbound;
1043}
1044impl From<WorldEvent> for ClientboundPlayPacket {
1045 fn from(p: WorldEvent) -> Self {
1046 Self::WorldEvent(p)
1047 }
1048}
1049
1050pub type WorldParticles = crate::defs::p775::play::clientbound::WorldParticles<775>;
1052impl crate::packet::Packet for WorldParticles {
1053 const ID: i32 = id::WORLD_PARTICLES;
1054 const NAME: &'static str = "world_particles";
1055 const STATE: State = State::Play;
1056 const DIRECTION: Direction = Direction::Clientbound;
1057}
1058impl From<WorldParticles> for ClientboundPlayPacket {
1059 fn from(p: WorldParticles) -> Self {
1060 Self::WorldParticles(p)
1061 }
1062}
1063
1064pub type UpdateLight = crate::defs::p775::play::clientbound::UpdateLight<775>;
1066impl crate::packet::Packet for UpdateLight {
1067 const ID: i32 = id::UPDATE_LIGHT;
1068 const NAME: &'static str = "update_light";
1069 const STATE: State = State::Play;
1070 const DIRECTION: Direction = Direction::Clientbound;
1071}
1072impl From<UpdateLight> for ClientboundPlayPacket {
1073 fn from(p: UpdateLight) -> Self {
1074 Self::UpdateLight(p)
1075 }
1076}
1077
1078pub type Login = crate::defs::p775::play::clientbound::Login<775>;
1080impl crate::packet::Packet for Login {
1081 const ID: i32 = id::LOGIN;
1082 const NAME: &'static str = "login";
1083 const STATE: State = State::Play;
1084 const DIRECTION: Direction = Direction::Clientbound;
1085}
1086impl From<Login> for ClientboundPlayPacket {
1087 fn from(p: Login) -> Self {
1088 Self::Login(p)
1089 }
1090}
1091
1092pub type LowDiskSpaceWarning = crate::defs::p775::play::clientbound::LowDiskSpaceWarning<775>;
1094impl crate::packet::Packet for LowDiskSpaceWarning {
1095 const ID: i32 = id::LOW_DISK_SPACE_WARNING;
1096 const NAME: &'static str = "low_disk_space_warning";
1097 const STATE: State = State::Play;
1098 const DIRECTION: Direction = Direction::Clientbound;
1099}
1100impl From<LowDiskSpaceWarning> for ClientboundPlayPacket {
1101 fn from(p: LowDiskSpaceWarning) -> Self {
1102 Self::LowDiskSpaceWarning(p)
1103 }
1104}
1105
1106pub type Map = crate::defs::p775::play::clientbound::Map<775>;
1108impl crate::packet::Packet for Map {
1109 const ID: i32 = id::MAP;
1110 const NAME: &'static str = "map";
1111 const STATE: State = State::Play;
1112 const DIRECTION: Direction = Direction::Clientbound;
1113}
1114impl From<Map> for ClientboundPlayPacket {
1115 fn from(p: Map) -> Self {
1116 Self::Map(p)
1117 }
1118}
1119
1120pub type TradeList = crate::defs::p775::play::clientbound::TradeList<775>;
1122impl crate::packet::Packet for TradeList {
1123 const ID: i32 = id::TRADE_LIST;
1124 const NAME: &'static str = "trade_list";
1125 const STATE: State = State::Play;
1126 const DIRECTION: Direction = Direction::Clientbound;
1127}
1128impl From<TradeList> for ClientboundPlayPacket {
1129 fn from(p: TradeList) -> Self {
1130 Self::TradeList(p)
1131 }
1132}
1133
1134pub type RelEntityMove = crate::defs::p340::play::clientbound::RelEntityMove<775>;
1136impl crate::packet::Packet for RelEntityMove {
1137 const ID: i32 = id::REL_ENTITY_MOVE;
1138 const NAME: &'static str = "rel_entity_move";
1139 const STATE: State = State::Play;
1140 const DIRECTION: Direction = Direction::Clientbound;
1141}
1142impl From<RelEntityMove> for ClientboundPlayPacket {
1143 fn from(p: RelEntityMove) -> Self {
1144 Self::RelEntityMove(p)
1145 }
1146}
1147
1148pub type EntityMoveLook = crate::defs::p340::play::clientbound::EntityMoveLook<775>;
1150impl crate::packet::Packet for EntityMoveLook {
1151 const ID: i32 = id::ENTITY_MOVE_LOOK;
1152 const NAME: &'static str = "entity_move_look";
1153 const STATE: State = State::Play;
1154 const DIRECTION: Direction = Direction::Clientbound;
1155}
1156impl From<EntityMoveLook> for ClientboundPlayPacket {
1157 fn from(p: EntityMoveLook) -> Self {
1158 Self::EntityMoveLook(p)
1159 }
1160}
1161
1162pub type MoveMinecart = crate::defs::p775::play::clientbound::MoveMinecart<775>;
1164impl crate::packet::Packet for MoveMinecart {
1165 const ID: i32 = id::MOVE_MINECART;
1166 const NAME: &'static str = "move_minecart";
1167 const STATE: State = State::Play;
1168 const DIRECTION: Direction = Direction::Clientbound;
1169}
1170impl From<MoveMinecart> for ClientboundPlayPacket {
1171 fn from(p: MoveMinecart) -> Self {
1172 Self::MoveMinecart(p)
1173 }
1174}
1175
1176pub type EntityLook = crate::defs::p47::play::clientbound::EntityLook<775>;
1178impl crate::packet::Packet for EntityLook {
1179 const ID: i32 = id::ENTITY_LOOK;
1180 const NAME: &'static str = "entity_look";
1181 const STATE: State = State::Play;
1182 const DIRECTION: Direction = Direction::Clientbound;
1183}
1184impl From<EntityLook> for ClientboundPlayPacket {
1185 fn from(p: EntityLook) -> Self {
1186 Self::EntityLook(p)
1187 }
1188}
1189
1190pub type VehicleMove = crate::defs::p340::play::clientbound::VehicleMove<775>;
1192impl crate::packet::Packet for VehicleMove {
1193 const ID: i32 = id::VEHICLE_MOVE;
1194 const NAME: &'static str = "vehicle_move";
1195 const STATE: State = State::Play;
1196 const DIRECTION: Direction = Direction::Clientbound;
1197}
1198impl From<VehicleMove> for ClientboundPlayPacket {
1199 fn from(p: VehicleMove) -> Self {
1200 Self::VehicleMove(p)
1201 }
1202}
1203
1204pub type OpenBook = crate::defs::p775::play::clientbound::OpenBook<775>;
1206impl crate::packet::Packet for OpenBook {
1207 const ID: i32 = id::OPEN_BOOK;
1208 const NAME: &'static str = "open_book";
1209 const STATE: State = State::Play;
1210 const DIRECTION: Direction = Direction::Clientbound;
1211}
1212impl From<OpenBook> for ClientboundPlayPacket {
1213 fn from(p: OpenBook) -> Self {
1214 Self::OpenBook(p)
1215 }
1216}
1217
1218pub type OpenWindow = crate::defs::p775::play::clientbound::OpenWindow<775>;
1220impl crate::packet::Packet for OpenWindow {
1221 const ID: i32 = id::OPEN_WINDOW;
1222 const NAME: &'static str = "open_window";
1223 const STATE: State = State::Play;
1224 const DIRECTION: Direction = Direction::Clientbound;
1225}
1226impl From<OpenWindow> for ClientboundPlayPacket {
1227 fn from(p: OpenWindow) -> Self {
1228 Self::OpenWindow(p)
1229 }
1230}
1231
1232pub type OpenSignEntity = crate::defs::p775::play::clientbound::OpenSignEntity<775>;
1234impl crate::packet::Packet for OpenSignEntity {
1235 const ID: i32 = id::OPEN_SIGN_ENTITY;
1236 const NAME: &'static str = "open_sign_entity";
1237 const STATE: State = State::Play;
1238 const DIRECTION: Direction = Direction::Clientbound;
1239}
1240impl From<OpenSignEntity> for ClientboundPlayPacket {
1241 fn from(p: OpenSignEntity) -> Self {
1242 Self::OpenSignEntity(p)
1243 }
1244}
1245
1246pub type Ping = crate::defs::p775::play::clientbound::Ping<775>;
1248impl crate::packet::Packet for Ping {
1249 const ID: i32 = id::PING;
1250 const NAME: &'static str = "ping";
1251 const STATE: State = State::Play;
1252 const DIRECTION: Direction = Direction::Clientbound;
1253}
1254impl From<Ping> for ClientboundPlayPacket {
1255 fn from(p: Ping) -> Self {
1256 Self::Ping(p)
1257 }
1258}
1259
1260pub type PingResponse = crate::defs::p775::play::clientbound::PingResponse<775>;
1262impl crate::packet::Packet for PingResponse {
1263 const ID: i32 = id::PING_RESPONSE;
1264 const NAME: &'static str = "ping_response";
1265 const STATE: State = State::Play;
1266 const DIRECTION: Direction = Direction::Clientbound;
1267}
1268impl From<PingResponse> for ClientboundPlayPacket {
1269 fn from(p: PingResponse) -> Self {
1270 Self::PingResponse(p)
1271 }
1272}
1273
1274pub type CraftRecipeResponse = crate::defs::p775::play::clientbound::CraftRecipeResponse<775>;
1276impl crate::packet::Packet for CraftRecipeResponse {
1277 const ID: i32 = id::CRAFT_RECIPE_RESPONSE;
1278 const NAME: &'static str = "craft_recipe_response";
1279 const STATE: State = State::Play;
1280 const DIRECTION: Direction = Direction::Clientbound;
1281}
1282impl From<CraftRecipeResponse> for ClientboundPlayPacket {
1283 fn from(p: CraftRecipeResponse) -> Self {
1284 Self::CraftRecipeResponse(p)
1285 }
1286}
1287
1288pub type Abilities = crate::defs::p47::play::clientbound::Abilities<775>;
1290impl crate::packet::Packet for Abilities {
1291 const ID: i32 = id::ABILITIES;
1292 const NAME: &'static str = "abilities";
1293 const STATE: State = State::Play;
1294 const DIRECTION: Direction = Direction::Clientbound;
1295}
1296impl From<Abilities> for ClientboundPlayPacket {
1297 fn from(p: Abilities) -> Self {
1298 Self::Abilities(p)
1299 }
1300}
1301
1302pub type PlayerChat = crate::defs::p775::play::clientbound::PlayerChat<775>;
1304impl crate::packet::Packet for PlayerChat {
1305 const ID: i32 = id::PLAYER_CHAT;
1306 const NAME: &'static str = "player_chat";
1307 const STATE: State = State::Play;
1308 const DIRECTION: Direction = Direction::Clientbound;
1309}
1310impl From<PlayerChat> for ClientboundPlayPacket {
1311 fn from(p: PlayerChat) -> Self {
1312 Self::PlayerChat(p)
1313 }
1314}
1315
1316pub type EndCombatEvent = crate::defs::p775::play::clientbound::EndCombatEvent<775>;
1318impl crate::packet::Packet for EndCombatEvent {
1319 const ID: i32 = id::END_COMBAT_EVENT;
1320 const NAME: &'static str = "end_combat_event";
1321 const STATE: State = State::Play;
1322 const DIRECTION: Direction = Direction::Clientbound;
1323}
1324impl From<EndCombatEvent> for ClientboundPlayPacket {
1325 fn from(p: EndCombatEvent) -> Self {
1326 Self::EndCombatEvent(p)
1327 }
1328}
1329
1330pub type EnterCombatEvent = crate::defs::p775::play::clientbound::EnterCombatEvent<775>;
1332impl crate::packet::Packet for EnterCombatEvent {
1333 const ID: i32 = id::ENTER_COMBAT_EVENT;
1334 const NAME: &'static str = "enter_combat_event";
1335 const STATE: State = State::Play;
1336 const DIRECTION: Direction = Direction::Clientbound;
1337}
1338impl From<EnterCombatEvent> for ClientboundPlayPacket {
1339 fn from(p: EnterCombatEvent) -> Self {
1340 Self::EnterCombatEvent(p)
1341 }
1342}
1343
1344pub type DeathCombatEvent = crate::defs::p775::play::clientbound::DeathCombatEvent<775>;
1346impl crate::packet::Packet for DeathCombatEvent {
1347 const ID: i32 = id::DEATH_COMBAT_EVENT;
1348 const NAME: &'static str = "death_combat_event";
1349 const STATE: State = State::Play;
1350 const DIRECTION: Direction = Direction::Clientbound;
1351}
1352impl From<DeathCombatEvent> for ClientboundPlayPacket {
1353 fn from(p: DeathCombatEvent) -> Self {
1354 Self::DeathCombatEvent(p)
1355 }
1356}
1357
1358pub type PlayerRemove = crate::defs::p775::play::clientbound::PlayerRemove<775>;
1360impl crate::packet::Packet for PlayerRemove {
1361 const ID: i32 = id::PLAYER_REMOVE;
1362 const NAME: &'static str = "player_remove";
1363 const STATE: State = State::Play;
1364 const DIRECTION: Direction = Direction::Clientbound;
1365}
1366impl From<PlayerRemove> for ClientboundPlayPacket {
1367 fn from(p: PlayerRemove) -> Self {
1368 Self::PlayerRemove(p)
1369 }
1370}
1371
1372pub type PlayerInfo = crate::defs::p775::play::clientbound::PlayerInfo<775>;
1374impl crate::packet::Packet for PlayerInfo {
1375 const ID: i32 = id::PLAYER_INFO;
1376 const NAME: &'static str = "player_info";
1377 const STATE: State = State::Play;
1378 const DIRECTION: Direction = Direction::Clientbound;
1379}
1380impl From<PlayerInfo> for ClientboundPlayPacket {
1381 fn from(p: PlayerInfo) -> Self {
1382 Self::PlayerInfo(p)
1383 }
1384}
1385
1386pub type FacePlayer = crate::defs::p775::play::clientbound::FacePlayer<775>;
1388impl crate::packet::Packet for FacePlayer {
1389 const ID: i32 = id::FACE_PLAYER;
1390 const NAME: &'static str = "face_player";
1391 const STATE: State = State::Play;
1392 const DIRECTION: Direction = Direction::Clientbound;
1393}
1394impl From<FacePlayer> for ClientboundPlayPacket {
1395 fn from(p: FacePlayer) -> Self {
1396 Self::FacePlayer(p)
1397 }
1398}
1399
1400pub type Position = crate::defs::p775::play::clientbound::Position<775>;
1402impl crate::packet::Packet for Position {
1403 const ID: i32 = id::POSITION;
1404 const NAME: &'static str = "position";
1405 const STATE: State = State::Play;
1406 const DIRECTION: Direction = Direction::Clientbound;
1407}
1408impl From<Position> for ClientboundPlayPacket {
1409 fn from(p: Position) -> Self {
1410 Self::Position(p)
1411 }
1412}
1413
1414pub type PlayerRotation = crate::defs::p775::play::clientbound::PlayerRotation<775>;
1416impl crate::packet::Packet for PlayerRotation {
1417 const ID: i32 = id::PLAYER_ROTATION;
1418 const NAME: &'static str = "player_rotation";
1419 const STATE: State = State::Play;
1420 const DIRECTION: Direction = Direction::Clientbound;
1421}
1422impl From<PlayerRotation> for ClientboundPlayPacket {
1423 fn from(p: PlayerRotation) -> Self {
1424 Self::PlayerRotation(p)
1425 }
1426}
1427
1428pub type RecipeBookAdd = crate::defs::p775::play::clientbound::RecipeBookAdd<775>;
1430impl crate::packet::Packet for RecipeBookAdd {
1431 const ID: i32 = id::RECIPE_BOOK_ADD;
1432 const NAME: &'static str = "recipe_book_add";
1433 const STATE: State = State::Play;
1434 const DIRECTION: Direction = Direction::Clientbound;
1435}
1436impl From<RecipeBookAdd> for ClientboundPlayPacket {
1437 fn from(p: RecipeBookAdd) -> Self {
1438 Self::RecipeBookAdd(p)
1439 }
1440}
1441
1442pub type RecipeBookRemove = crate::defs::p775::play::clientbound::RecipeBookRemove<775>;
1444impl crate::packet::Packet for RecipeBookRemove {
1445 const ID: i32 = id::RECIPE_BOOK_REMOVE;
1446 const NAME: &'static str = "recipe_book_remove";
1447 const STATE: State = State::Play;
1448 const DIRECTION: Direction = Direction::Clientbound;
1449}
1450impl From<RecipeBookRemove> for ClientboundPlayPacket {
1451 fn from(p: RecipeBookRemove) -> Self {
1452 Self::RecipeBookRemove(p)
1453 }
1454}
1455
1456pub type RecipeBookSettings = crate::defs::p775::play::clientbound::RecipeBookSettings<775>;
1458impl crate::packet::Packet for RecipeBookSettings {
1459 const ID: i32 = id::RECIPE_BOOK_SETTINGS;
1460 const NAME: &'static str = "recipe_book_settings";
1461 const STATE: State = State::Play;
1462 const DIRECTION: Direction = Direction::Clientbound;
1463}
1464impl From<RecipeBookSettings> for ClientboundPlayPacket {
1465 fn from(p: RecipeBookSettings) -> Self {
1466 Self::RecipeBookSettings(p)
1467 }
1468}
1469
1470pub type EntityDestroy = crate::defs::p47::play::clientbound::EntityDestroy<775>;
1472impl crate::packet::Packet for EntityDestroy {
1473 const ID: i32 = id::ENTITY_DESTROY;
1474 const NAME: &'static str = "entity_destroy";
1475 const STATE: State = State::Play;
1476 const DIRECTION: Direction = Direction::Clientbound;
1477}
1478impl From<EntityDestroy> for ClientboundPlayPacket {
1479 fn from(p: EntityDestroy) -> Self {
1480 Self::EntityDestroy(p)
1481 }
1482}
1483
1484pub type RemoveEntityEffect = crate::defs::p775::play::clientbound::RemoveEntityEffect<775>;
1486impl crate::packet::Packet for RemoveEntityEffect {
1487 const ID: i32 = id::REMOVE_ENTITY_EFFECT;
1488 const NAME: &'static str = "remove_entity_effect";
1489 const STATE: State = State::Play;
1490 const DIRECTION: Direction = Direction::Clientbound;
1491}
1492impl From<RemoveEntityEffect> for ClientboundPlayPacket {
1493 fn from(p: RemoveEntityEffect) -> Self {
1494 Self::RemoveEntityEffect(p)
1495 }
1496}
1497
1498pub type ResetScore = crate::defs::p775::play::clientbound::ResetScore<775>;
1500impl crate::packet::Packet for ResetScore {
1501 const ID: i32 = id::RESET_SCORE;
1502 const NAME: &'static str = "reset_score";
1503 const STATE: State = State::Play;
1504 const DIRECTION: Direction = Direction::Clientbound;
1505}
1506impl From<ResetScore> for ClientboundPlayPacket {
1507 fn from(p: ResetScore) -> Self {
1508 Self::ResetScore(p)
1509 }
1510}
1511
1512pub type RemoveResourcePack = crate::defs::p775::play::clientbound::RemoveResourcePack<775>;
1514impl crate::packet::Packet for RemoveResourcePack {
1515 const ID: i32 = id::REMOVE_RESOURCE_PACK;
1516 const NAME: &'static str = "remove_resource_pack";
1517 const STATE: State = State::Play;
1518 const DIRECTION: Direction = Direction::Clientbound;
1519}
1520impl From<RemoveResourcePack> for ClientboundPlayPacket {
1521 fn from(p: RemoveResourcePack) -> Self {
1522 Self::RemoveResourcePack(p)
1523 }
1524}
1525
1526pub type AddResourcePack = crate::defs::p775::play::clientbound::AddResourcePack<775>;
1528impl crate::packet::Packet for AddResourcePack {
1529 const ID: i32 = id::ADD_RESOURCE_PACK;
1530 const NAME: &'static str = "add_resource_pack";
1531 const STATE: State = State::Play;
1532 const DIRECTION: Direction = Direction::Clientbound;
1533}
1534impl From<AddResourcePack> for ClientboundPlayPacket {
1535 fn from(p: AddResourcePack) -> Self {
1536 Self::AddResourcePack(p)
1537 }
1538}
1539
1540pub type Respawn = crate::defs::p775::play::clientbound::Respawn<775>;
1542impl crate::packet::Packet for Respawn {
1543 const ID: i32 = id::RESPAWN;
1544 const NAME: &'static str = "respawn";
1545 const STATE: State = State::Play;
1546 const DIRECTION: Direction = Direction::Clientbound;
1547}
1548impl From<Respawn> for ClientboundPlayPacket {
1549 fn from(p: Respawn) -> Self {
1550 Self::Respawn(p)
1551 }
1552}
1553
1554pub type EntityHeadRotation = crate::defs::p47::play::clientbound::EntityHeadRotation<775>;
1556impl crate::packet::Packet for EntityHeadRotation {
1557 const ID: i32 = id::ENTITY_HEAD_ROTATION;
1558 const NAME: &'static str = "entity_head_rotation";
1559 const STATE: State = State::Play;
1560 const DIRECTION: Direction = Direction::Clientbound;
1561}
1562impl From<EntityHeadRotation> for ClientboundPlayPacket {
1563 fn from(p: EntityHeadRotation) -> Self {
1564 Self::EntityHeadRotation(p)
1565 }
1566}
1567
1568pub type MultiBlockChange = crate::defs::p775::play::clientbound::MultiBlockChange<775>;
1570impl crate::packet::Packet for MultiBlockChange {
1571 const ID: i32 = id::MULTI_BLOCK_CHANGE;
1572 const NAME: &'static str = "multi_block_change";
1573 const STATE: State = State::Play;
1574 const DIRECTION: Direction = Direction::Clientbound;
1575}
1576impl From<MultiBlockChange> for ClientboundPlayPacket {
1577 fn from(p: MultiBlockChange) -> Self {
1578 Self::MultiBlockChange(p)
1579 }
1580}
1581
1582pub type SelectAdvancementTab = crate::defs::p340::play::clientbound::SelectAdvancementTab<775>;
1584impl crate::packet::Packet for SelectAdvancementTab {
1585 const ID: i32 = id::SELECT_ADVANCEMENT_TAB;
1586 const NAME: &'static str = "select_advancement_tab";
1587 const STATE: State = State::Play;
1588 const DIRECTION: Direction = Direction::Clientbound;
1589}
1590impl From<SelectAdvancementTab> for ClientboundPlayPacket {
1591 fn from(p: SelectAdvancementTab) -> Self {
1592 Self::SelectAdvancementTab(p)
1593 }
1594}
1595
1596pub type ServerData = crate::defs::p775::play::clientbound::ServerData<775>;
1598impl crate::packet::Packet for ServerData {
1599 const ID: i32 = id::SERVER_DATA;
1600 const NAME: &'static str = "server_data";
1601 const STATE: State = State::Play;
1602 const DIRECTION: Direction = Direction::Clientbound;
1603}
1604impl From<ServerData> for ClientboundPlayPacket {
1605 fn from(p: ServerData) -> Self {
1606 Self::ServerData(p)
1607 }
1608}
1609
1610pub type ActionBar = crate::defs::p775::play::clientbound::ActionBar<775>;
1612impl crate::packet::Packet for ActionBar {
1613 const ID: i32 = id::ACTION_BAR;
1614 const NAME: &'static str = "action_bar";
1615 const STATE: State = State::Play;
1616 const DIRECTION: Direction = Direction::Clientbound;
1617}
1618impl From<ActionBar> for ClientboundPlayPacket {
1619 fn from(p: ActionBar) -> Self {
1620 Self::ActionBar(p)
1621 }
1622}
1623
1624pub type WorldBorderCenter = crate::defs::p775::play::clientbound::WorldBorderCenter<775>;
1626impl crate::packet::Packet for WorldBorderCenter {
1627 const ID: i32 = id::WORLD_BORDER_CENTER;
1628 const NAME: &'static str = "world_border_center";
1629 const STATE: State = State::Play;
1630 const DIRECTION: Direction = Direction::Clientbound;
1631}
1632impl From<WorldBorderCenter> for ClientboundPlayPacket {
1633 fn from(p: WorldBorderCenter) -> Self {
1634 Self::WorldBorderCenter(p)
1635 }
1636}
1637
1638pub type WorldBorderLerpSize = crate::defs::p775::play::clientbound::WorldBorderLerpSize<775>;
1640impl crate::packet::Packet for WorldBorderLerpSize {
1641 const ID: i32 = id::WORLD_BORDER_LERP_SIZE;
1642 const NAME: &'static str = "world_border_lerp_size";
1643 const STATE: State = State::Play;
1644 const DIRECTION: Direction = Direction::Clientbound;
1645}
1646impl From<WorldBorderLerpSize> for ClientboundPlayPacket {
1647 fn from(p: WorldBorderLerpSize) -> Self {
1648 Self::WorldBorderLerpSize(p)
1649 }
1650}
1651
1652pub type WorldBorderSize = crate::defs::p775::play::clientbound::WorldBorderSize<775>;
1654impl crate::packet::Packet for WorldBorderSize {
1655 const ID: i32 = id::WORLD_BORDER_SIZE;
1656 const NAME: &'static str = "world_border_size";
1657 const STATE: State = State::Play;
1658 const DIRECTION: Direction = Direction::Clientbound;
1659}
1660impl From<WorldBorderSize> for ClientboundPlayPacket {
1661 fn from(p: WorldBorderSize) -> Self {
1662 Self::WorldBorderSize(p)
1663 }
1664}
1665
1666pub type WorldBorderWarningDelay =
1668 crate::defs::p775::play::clientbound::WorldBorderWarningDelay<775>;
1669impl crate::packet::Packet for WorldBorderWarningDelay {
1670 const ID: i32 = id::WORLD_BORDER_WARNING_DELAY;
1671 const NAME: &'static str = "world_border_warning_delay";
1672 const STATE: State = State::Play;
1673 const DIRECTION: Direction = Direction::Clientbound;
1674}
1675impl From<WorldBorderWarningDelay> for ClientboundPlayPacket {
1676 fn from(p: WorldBorderWarningDelay) -> Self {
1677 Self::WorldBorderWarningDelay(p)
1678 }
1679}
1680
1681pub type WorldBorderWarningReach =
1683 crate::defs::p775::play::clientbound::WorldBorderWarningReach<775>;
1684impl crate::packet::Packet for WorldBorderWarningReach {
1685 const ID: i32 = id::WORLD_BORDER_WARNING_REACH;
1686 const NAME: &'static str = "world_border_warning_reach";
1687 const STATE: State = State::Play;
1688 const DIRECTION: Direction = Direction::Clientbound;
1689}
1690impl From<WorldBorderWarningReach> for ClientboundPlayPacket {
1691 fn from(p: WorldBorderWarningReach) -> Self {
1692 Self::WorldBorderWarningReach(p)
1693 }
1694}
1695
1696pub type Camera = crate::defs::p47::play::clientbound::Camera<775>;
1698impl crate::packet::Packet for Camera {
1699 const ID: i32 = id::CAMERA;
1700 const NAME: &'static str = "camera";
1701 const STATE: State = State::Play;
1702 const DIRECTION: Direction = Direction::Clientbound;
1703}
1704impl From<Camera> for ClientboundPlayPacket {
1705 fn from(p: Camera) -> Self {
1706 Self::Camera(p)
1707 }
1708}
1709
1710pub type UpdateViewPosition = crate::defs::p754::play::clientbound::UpdateViewPosition<775>;
1712impl crate::packet::Packet for UpdateViewPosition {
1713 const ID: i32 = id::UPDATE_VIEW_POSITION;
1714 const NAME: &'static str = "update_view_position";
1715 const STATE: State = State::Play;
1716 const DIRECTION: Direction = Direction::Clientbound;
1717}
1718impl From<UpdateViewPosition> for ClientboundPlayPacket {
1719 fn from(p: UpdateViewPosition) -> Self {
1720 Self::UpdateViewPosition(p)
1721 }
1722}
1723
1724pub type UpdateViewDistance = crate::defs::p754::play::clientbound::UpdateViewDistance<775>;
1726impl crate::packet::Packet for UpdateViewDistance {
1727 const ID: i32 = id::UPDATE_VIEW_DISTANCE;
1728 const NAME: &'static str = "update_view_distance";
1729 const STATE: State = State::Play;
1730 const DIRECTION: Direction = Direction::Clientbound;
1731}
1732impl From<UpdateViewDistance> for ClientboundPlayPacket {
1733 fn from(p: UpdateViewDistance) -> Self {
1734 Self::UpdateViewDistance(p)
1735 }
1736}
1737
1738pub type SetCursorItem = crate::defs::p775::play::clientbound::SetCursorItem<775>;
1740impl crate::packet::Packet for SetCursorItem {
1741 const ID: i32 = id::SET_CURSOR_ITEM;
1742 const NAME: &'static str = "set_cursor_item";
1743 const STATE: State = State::Play;
1744 const DIRECTION: Direction = Direction::Clientbound;
1745}
1746impl From<SetCursorItem> for ClientboundPlayPacket {
1747 fn from(p: SetCursorItem) -> Self {
1748 Self::SetCursorItem(p)
1749 }
1750}
1751
1752pub type SpawnPosition = crate::defs::p775::play::clientbound::SpawnPosition<775>;
1754impl crate::packet::Packet for SpawnPosition {
1755 const ID: i32 = id::SPAWN_POSITION;
1756 const NAME: &'static str = "spawn_position";
1757 const STATE: State = State::Play;
1758 const DIRECTION: Direction = Direction::Clientbound;
1759}
1760impl From<SpawnPosition> for ClientboundPlayPacket {
1761 fn from(p: SpawnPosition) -> Self {
1762 Self::SpawnPosition(p)
1763 }
1764}
1765
1766pub type ScoreboardDisplayObjective =
1768 crate::defs::p775::play::clientbound::ScoreboardDisplayObjective<775>;
1769impl crate::packet::Packet for ScoreboardDisplayObjective {
1770 const ID: i32 = id::SCOREBOARD_DISPLAY_OBJECTIVE;
1771 const NAME: &'static str = "scoreboard_display_objective";
1772 const STATE: State = State::Play;
1773 const DIRECTION: Direction = Direction::Clientbound;
1774}
1775impl From<ScoreboardDisplayObjective> for ClientboundPlayPacket {
1776 fn from(p: ScoreboardDisplayObjective) -> Self {
1777 Self::ScoreboardDisplayObjective(p)
1778 }
1779}
1780
1781pub type EntityMetadata = crate::defs::p775::play::clientbound::EntityMetadata<775>;
1783impl crate::packet::Packet for EntityMetadata {
1784 const ID: i32 = id::ENTITY_METADATA;
1785 const NAME: &'static str = "entity_metadata";
1786 const STATE: State = State::Play;
1787 const DIRECTION: Direction = Direction::Clientbound;
1788}
1789impl From<EntityMetadata> for ClientboundPlayPacket {
1790 fn from(p: EntityMetadata) -> Self {
1791 Self::EntityMetadata(p)
1792 }
1793}
1794
1795pub type AttachEntity = crate::defs::p340::play::clientbound::AttachEntity<775>;
1797impl crate::packet::Packet for AttachEntity {
1798 const ID: i32 = id::ATTACH_ENTITY;
1799 const NAME: &'static str = "attach_entity";
1800 const STATE: State = State::Play;
1801 const DIRECTION: Direction = Direction::Clientbound;
1802}
1803impl From<AttachEntity> for ClientboundPlayPacket {
1804 fn from(p: AttachEntity) -> Self {
1805 Self::AttachEntity(p)
1806 }
1807}
1808
1809pub type EntityVelocity = crate::defs::p775::play::clientbound::EntityVelocity<775>;
1811impl crate::packet::Packet for EntityVelocity {
1812 const ID: i32 = id::ENTITY_VELOCITY;
1813 const NAME: &'static str = "entity_velocity";
1814 const STATE: State = State::Play;
1815 const DIRECTION: Direction = Direction::Clientbound;
1816}
1817impl From<EntityVelocity> for ClientboundPlayPacket {
1818 fn from(p: EntityVelocity) -> Self {
1819 Self::EntityVelocity(p)
1820 }
1821}
1822
1823pub type EntityEquipment = crate::defs::p775::play::clientbound::EntityEquipment<775>;
1825impl crate::packet::Packet for EntityEquipment {
1826 const ID: i32 = id::ENTITY_EQUIPMENT;
1827 const NAME: &'static str = "entity_equipment";
1828 const STATE: State = State::Play;
1829 const DIRECTION: Direction = Direction::Clientbound;
1830}
1831impl From<EntityEquipment> for ClientboundPlayPacket {
1832 fn from(p: EntityEquipment) -> Self {
1833 Self::EntityEquipment(p)
1834 }
1835}
1836
1837pub type Experience = crate::defs::p47::play::clientbound::Experience<775>;
1839impl crate::packet::Packet for Experience {
1840 const ID: i32 = id::EXPERIENCE;
1841 const NAME: &'static str = "experience";
1842 const STATE: State = State::Play;
1843 const DIRECTION: Direction = Direction::Clientbound;
1844}
1845impl From<Experience> for ClientboundPlayPacket {
1846 fn from(p: Experience) -> Self {
1847 Self::Experience(p)
1848 }
1849}
1850
1851pub type UpdateHealth = crate::defs::p47::play::clientbound::UpdateHealth<775>;
1853impl crate::packet::Packet for UpdateHealth {
1854 const ID: i32 = id::UPDATE_HEALTH;
1855 const NAME: &'static str = "update_health";
1856 const STATE: State = State::Play;
1857 const DIRECTION: Direction = Direction::Clientbound;
1858}
1859impl From<UpdateHealth> for ClientboundPlayPacket {
1860 fn from(p: UpdateHealth) -> Self {
1861 Self::UpdateHealth(p)
1862 }
1863}
1864
1865pub type HeldItemSlot = crate::defs::p775::play::clientbound::HeldItemSlot<775>;
1867impl crate::packet::Packet for HeldItemSlot {
1868 const ID: i32 = id::HELD_ITEM_SLOT;
1869 const NAME: &'static str = "held_item_slot";
1870 const STATE: State = State::Play;
1871 const DIRECTION: Direction = Direction::Clientbound;
1872}
1873impl From<HeldItemSlot> for ClientboundPlayPacket {
1874 fn from(p: HeldItemSlot) -> Self {
1875 Self::HeldItemSlot(p)
1876 }
1877}
1878
1879pub type ScoreboardObjective = crate::defs::p775::play::clientbound::ScoreboardObjective<775>;
1881impl crate::packet::Packet for ScoreboardObjective {
1882 const ID: i32 = id::SCOREBOARD_OBJECTIVE;
1883 const NAME: &'static str = "scoreboard_objective";
1884 const STATE: State = State::Play;
1885 const DIRECTION: Direction = Direction::Clientbound;
1886}
1887impl From<ScoreboardObjective> for ClientboundPlayPacket {
1888 fn from(p: ScoreboardObjective) -> Self {
1889 Self::ScoreboardObjective(p)
1890 }
1891}
1892
1893pub type SetPassengers = crate::defs::p340::play::clientbound::SetPassengers<775>;
1895impl crate::packet::Packet for SetPassengers {
1896 const ID: i32 = id::SET_PASSENGERS;
1897 const NAME: &'static str = "set_passengers";
1898 const STATE: State = State::Play;
1899 const DIRECTION: Direction = Direction::Clientbound;
1900}
1901impl From<SetPassengers> for ClientboundPlayPacket {
1902 fn from(p: SetPassengers) -> Self {
1903 Self::SetPassengers(p)
1904 }
1905}
1906
1907pub type SetPlayerInventory = crate::defs::p775::play::clientbound::SetPlayerInventory<775>;
1909impl crate::packet::Packet for SetPlayerInventory {
1910 const ID: i32 = id::SET_PLAYER_INVENTORY;
1911 const NAME: &'static str = "set_player_inventory";
1912 const STATE: State = State::Play;
1913 const DIRECTION: Direction = Direction::Clientbound;
1914}
1915impl From<SetPlayerInventory> for ClientboundPlayPacket {
1916 fn from(p: SetPlayerInventory) -> Self {
1917 Self::SetPlayerInventory(p)
1918 }
1919}
1920
1921pub type Teams = crate::defs::p775::play::clientbound::Teams<775>;
1923impl crate::packet::Packet for Teams {
1924 const ID: i32 = id::TEAMS;
1925 const NAME: &'static str = "teams";
1926 const STATE: State = State::Play;
1927 const DIRECTION: Direction = Direction::Clientbound;
1928}
1929impl From<Teams> for ClientboundPlayPacket {
1930 fn from(p: Teams) -> Self {
1931 Self::Teams(p)
1932 }
1933}
1934
1935pub type ScoreboardScore = crate::defs::p775::play::clientbound::ScoreboardScore<775>;
1937impl crate::packet::Packet for ScoreboardScore {
1938 const ID: i32 = id::SCOREBOARD_SCORE;
1939 const NAME: &'static str = "scoreboard_score";
1940 const STATE: State = State::Play;
1941 const DIRECTION: Direction = Direction::Clientbound;
1942}
1943impl From<ScoreboardScore> for ClientboundPlayPacket {
1944 fn from(p: ScoreboardScore) -> Self {
1945 Self::ScoreboardScore(p)
1946 }
1947}
1948
1949pub type SimulationDistance = crate::defs::p775::play::clientbound::SimulationDistance<775>;
1951impl crate::packet::Packet for SimulationDistance {
1952 const ID: i32 = id::SIMULATION_DISTANCE;
1953 const NAME: &'static str = "simulation_distance";
1954 const STATE: State = State::Play;
1955 const DIRECTION: Direction = Direction::Clientbound;
1956}
1957impl From<SimulationDistance> for ClientboundPlayPacket {
1958 fn from(p: SimulationDistance) -> Self {
1959 Self::SimulationDistance(p)
1960 }
1961}
1962
1963pub type SetTitleSubtitle = crate::defs::p775::play::clientbound::SetTitleSubtitle<775>;
1965impl crate::packet::Packet for SetTitleSubtitle {
1966 const ID: i32 = id::SET_TITLE_SUBTITLE;
1967 const NAME: &'static str = "set_title_subtitle";
1968 const STATE: State = State::Play;
1969 const DIRECTION: Direction = Direction::Clientbound;
1970}
1971impl From<SetTitleSubtitle> for ClientboundPlayPacket {
1972 fn from(p: SetTitleSubtitle) -> Self {
1973 Self::SetTitleSubtitle(p)
1974 }
1975}
1976
1977pub type UpdateTime = crate::defs::p775::play::clientbound::UpdateTime<775>;
1979impl crate::packet::Packet for UpdateTime {
1980 const ID: i32 = id::UPDATE_TIME;
1981 const NAME: &'static str = "update_time";
1982 const STATE: State = State::Play;
1983 const DIRECTION: Direction = Direction::Clientbound;
1984}
1985impl From<UpdateTime> for ClientboundPlayPacket {
1986 fn from(p: UpdateTime) -> Self {
1987 Self::UpdateTime(p)
1988 }
1989}
1990
1991pub type SetTitleText = crate::defs::p775::play::clientbound::SetTitleText<775>;
1993impl crate::packet::Packet for SetTitleText {
1994 const ID: i32 = id::SET_TITLE_TEXT;
1995 const NAME: &'static str = "set_title_text";
1996 const STATE: State = State::Play;
1997 const DIRECTION: Direction = Direction::Clientbound;
1998}
1999impl From<SetTitleText> for ClientboundPlayPacket {
2000 fn from(p: SetTitleText) -> Self {
2001 Self::SetTitleText(p)
2002 }
2003}
2004
2005pub type SetTitleTime = crate::defs::p775::play::clientbound::SetTitleTime<775>;
2007impl crate::packet::Packet for SetTitleTime {
2008 const ID: i32 = id::SET_TITLE_TIME;
2009 const NAME: &'static str = "set_title_time";
2010 const STATE: State = State::Play;
2011 const DIRECTION: Direction = Direction::Clientbound;
2012}
2013impl From<SetTitleTime> for ClientboundPlayPacket {
2014 fn from(p: SetTitleTime) -> Self {
2015 Self::SetTitleTime(p)
2016 }
2017}
2018
2019pub type EntitySoundEffect = crate::defs::p775::play::clientbound::EntitySoundEffect<775>;
2021impl crate::packet::Packet for EntitySoundEffect {
2022 const ID: i32 = id::ENTITY_SOUND_EFFECT;
2023 const NAME: &'static str = "entity_sound_effect";
2024 const STATE: State = State::Play;
2025 const DIRECTION: Direction = Direction::Clientbound;
2026}
2027impl From<EntitySoundEffect> for ClientboundPlayPacket {
2028 fn from(p: EntitySoundEffect) -> Self {
2029 Self::EntitySoundEffect(p)
2030 }
2031}
2032
2033pub type SoundEffect = crate::defs::p775::play::clientbound::SoundEffect<775>;
2035impl crate::packet::Packet for SoundEffect {
2036 const ID: i32 = id::SOUND_EFFECT;
2037 const NAME: &'static str = "sound_effect";
2038 const STATE: State = State::Play;
2039 const DIRECTION: Direction = Direction::Clientbound;
2040}
2041impl From<SoundEffect> for ClientboundPlayPacket {
2042 fn from(p: SoundEffect) -> Self {
2043 Self::SoundEffect(p)
2044 }
2045}
2046
2047pub type StartConfiguration = crate::defs::p775::play::clientbound::StartConfiguration<775>;
2049impl crate::packet::Packet for StartConfiguration {
2050 const ID: i32 = id::START_CONFIGURATION;
2051 const NAME: &'static str = "start_configuration";
2052 const STATE: State = State::Play;
2053 const DIRECTION: Direction = Direction::Clientbound;
2054}
2055impl From<StartConfiguration> for ClientboundPlayPacket {
2056 fn from(p: StartConfiguration) -> Self {
2057 Self::StartConfiguration(p)
2058 }
2059}
2060
2061pub type StopSound = crate::defs::p754::play::clientbound::StopSound<775>;
2063impl crate::packet::Packet for StopSound {
2064 const ID: i32 = id::STOP_SOUND;
2065 const NAME: &'static str = "stop_sound";
2066 const STATE: State = State::Play;
2067 const DIRECTION: Direction = Direction::Clientbound;
2068}
2069impl From<StopSound> for ClientboundPlayPacket {
2070 fn from(p: StopSound) -> Self {
2071 Self::StopSound(p)
2072 }
2073}
2074
2075pub type StoreCookie = crate::defs::p775::play::clientbound::StoreCookie<775>;
2077impl crate::packet::Packet for StoreCookie {
2078 const ID: i32 = id::STORE_COOKIE;
2079 const NAME: &'static str = "store_cookie";
2080 const STATE: State = State::Play;
2081 const DIRECTION: Direction = Direction::Clientbound;
2082}
2083impl From<StoreCookie> for ClientboundPlayPacket {
2084 fn from(p: StoreCookie) -> Self {
2085 Self::StoreCookie(p)
2086 }
2087}
2088
2089pub type SystemChat = crate::defs::p775::play::clientbound::SystemChat<775>;
2091impl crate::packet::Packet for SystemChat {
2092 const ID: i32 = id::SYSTEM_CHAT;
2093 const NAME: &'static str = "system_chat";
2094 const STATE: State = State::Play;
2095 const DIRECTION: Direction = Direction::Clientbound;
2096}
2097impl From<SystemChat> for ClientboundPlayPacket {
2098 fn from(p: SystemChat) -> Self {
2099 Self::SystemChat(p)
2100 }
2101}
2102
2103pub type PlayerlistHeader = crate::defs::p775::play::clientbound::PlayerlistHeader<775>;
2105impl crate::packet::Packet for PlayerlistHeader {
2106 const ID: i32 = id::PLAYERLIST_HEADER;
2107 const NAME: &'static str = "playerlist_header";
2108 const STATE: State = State::Play;
2109 const DIRECTION: Direction = Direction::Clientbound;
2110}
2111impl From<PlayerlistHeader> for ClientboundPlayPacket {
2112 fn from(p: PlayerlistHeader) -> Self {
2113 Self::PlayerlistHeader(p)
2114 }
2115}
2116
2117pub type NbtQueryResponse = crate::defs::p775::play::clientbound::NbtQueryResponse<775>;
2119impl crate::packet::Packet for NbtQueryResponse {
2120 const ID: i32 = id::NBT_QUERY_RESPONSE;
2121 const NAME: &'static str = "nbt_query_response";
2122 const STATE: State = State::Play;
2123 const DIRECTION: Direction = Direction::Clientbound;
2124}
2125impl From<NbtQueryResponse> for ClientboundPlayPacket {
2126 fn from(p: NbtQueryResponse) -> Self {
2127 Self::NbtQueryResponse(p)
2128 }
2129}
2130
2131pub type Collect = crate::defs::p340::play::clientbound::Collect<775>;
2133impl crate::packet::Packet for Collect {
2134 const ID: i32 = id::COLLECT;
2135 const NAME: &'static str = "collect";
2136 const STATE: State = State::Play;
2137 const DIRECTION: Direction = Direction::Clientbound;
2138}
2139impl From<Collect> for ClientboundPlayPacket {
2140 fn from(p: Collect) -> Self {
2141 Self::Collect(p)
2142 }
2143}
2144
2145pub type EntityTeleport = crate::defs::p775::play::clientbound::EntityTeleport<775>;
2147impl crate::packet::Packet for EntityTeleport {
2148 const ID: i32 = id::ENTITY_TELEPORT;
2149 const NAME: &'static str = "entity_teleport";
2150 const STATE: State = State::Play;
2151 const DIRECTION: Direction = Direction::Clientbound;
2152}
2153impl From<EntityTeleport> for ClientboundPlayPacket {
2154 fn from(p: EntityTeleport) -> Self {
2155 Self::EntityTeleport(p)
2156 }
2157}
2158
2159pub type TestInstanceBlockStatus =
2161 crate::defs::p775::play::clientbound::TestInstanceBlockStatus<775>;
2162impl crate::packet::Packet for TestInstanceBlockStatus {
2163 const ID: i32 = id::TEST_INSTANCE_BLOCK_STATUS;
2164 const NAME: &'static str = "test_instance_block_status";
2165 const STATE: State = State::Play;
2166 const DIRECTION: Direction = Direction::Clientbound;
2167}
2168impl From<TestInstanceBlockStatus> for ClientboundPlayPacket {
2169 fn from(p: TestInstanceBlockStatus) -> Self {
2170 Self::TestInstanceBlockStatus(p)
2171 }
2172}
2173
2174pub type SetTickingState = crate::defs::p775::play::clientbound::SetTickingState<775>;
2176impl crate::packet::Packet for SetTickingState {
2177 const ID: i32 = id::SET_TICKING_STATE;
2178 const NAME: &'static str = "set_ticking_state";
2179 const STATE: State = State::Play;
2180 const DIRECTION: Direction = Direction::Clientbound;
2181}
2182impl From<SetTickingState> for ClientboundPlayPacket {
2183 fn from(p: SetTickingState) -> Self {
2184 Self::SetTickingState(p)
2185 }
2186}
2187
2188pub type StepTick = crate::defs::p775::play::clientbound::StepTick<775>;
2190impl crate::packet::Packet for StepTick {
2191 const ID: i32 = id::STEP_TICK;
2192 const NAME: &'static str = "step_tick";
2193 const STATE: State = State::Play;
2194 const DIRECTION: Direction = Direction::Clientbound;
2195}
2196impl From<StepTick> for ClientboundPlayPacket {
2197 fn from(p: StepTick) -> Self {
2198 Self::StepTick(p)
2199 }
2200}
2201
2202pub type Transfer = crate::defs::p775::play::clientbound::Transfer<775>;
2204impl crate::packet::Packet for Transfer {
2205 const ID: i32 = id::TRANSFER;
2206 const NAME: &'static str = "transfer";
2207 const STATE: State = State::Play;
2208 const DIRECTION: Direction = Direction::Clientbound;
2209}
2210impl From<Transfer> for ClientboundPlayPacket {
2211 fn from(p: Transfer) -> Self {
2212 Self::Transfer(p)
2213 }
2214}
2215
2216pub type Advancements = crate::defs::p775::play::clientbound::Advancements<775>;
2218impl crate::packet::Packet for Advancements {
2219 const ID: i32 = id::ADVANCEMENTS;
2220 const NAME: &'static str = "advancements";
2221 const STATE: State = State::Play;
2222 const DIRECTION: Direction = Direction::Clientbound;
2223}
2224impl From<Advancements> for ClientboundPlayPacket {
2225 fn from(p: Advancements) -> Self {
2226 Self::Advancements(p)
2227 }
2228}
2229
2230pub type EntityUpdateAttributes = crate::defs::p775::play::clientbound::EntityUpdateAttributes<775>;
2232impl crate::packet::Packet for EntityUpdateAttributes {
2233 const ID: i32 = id::ENTITY_UPDATE_ATTRIBUTES;
2234 const NAME: &'static str = "entity_update_attributes";
2235 const STATE: State = State::Play;
2236 const DIRECTION: Direction = Direction::Clientbound;
2237}
2238impl From<EntityUpdateAttributes> for ClientboundPlayPacket {
2239 fn from(p: EntityUpdateAttributes) -> Self {
2240 Self::EntityUpdateAttributes(p)
2241 }
2242}
2243
2244pub type EntityEffect = crate::defs::p775::play::clientbound::EntityEffect<775>;
2246impl crate::packet::Packet for EntityEffect {
2247 const ID: i32 = id::ENTITY_EFFECT;
2248 const NAME: &'static str = "entity_effect";
2249 const STATE: State = State::Play;
2250 const DIRECTION: Direction = Direction::Clientbound;
2251}
2252impl From<EntityEffect> for ClientboundPlayPacket {
2253 fn from(p: EntityEffect) -> Self {
2254 Self::EntityEffect(p)
2255 }
2256}
2257
2258pub type DeclareRecipes = crate::defs::p775::play::clientbound::DeclareRecipes<775>;
2260impl crate::packet::Packet for DeclareRecipes {
2261 const ID: i32 = id::DECLARE_RECIPES;
2262 const NAME: &'static str = "declare_recipes";
2263 const STATE: State = State::Play;
2264 const DIRECTION: Direction = Direction::Clientbound;
2265}
2266impl From<DeclareRecipes> for ClientboundPlayPacket {
2267 fn from(p: DeclareRecipes) -> Self {
2268 Self::DeclareRecipes(p)
2269 }
2270}
2271
2272pub type Tags = crate::defs::p775::play::clientbound::Tags<775>;
2274impl crate::packet::Packet for Tags {
2275 const ID: i32 = id::TAGS;
2276 const NAME: &'static str = "tags";
2277 const STATE: State = State::Play;
2278 const DIRECTION: Direction = Direction::Clientbound;
2279}
2280impl From<Tags> for ClientboundPlayPacket {
2281 fn from(p: Tags) -> Self {
2282 Self::Tags(p)
2283 }
2284}
2285
2286pub type SetProjectilePower = crate::defs::p775::play::clientbound::SetProjectilePower<775>;
2288impl crate::packet::Packet for SetProjectilePower {
2289 const ID: i32 = id::SET_PROJECTILE_POWER;
2290 const NAME: &'static str = "set_projectile_power";
2291 const STATE: State = State::Play;
2292 const DIRECTION: Direction = Direction::Clientbound;
2293}
2294impl From<SetProjectilePower> for ClientboundPlayPacket {
2295 fn from(p: SetProjectilePower) -> Self {
2296 Self::SetProjectilePower(p)
2297 }
2298}
2299
2300pub type CustomReportDetails = crate::defs::p775::play::clientbound::CustomReportDetails<775>;
2302impl crate::packet::Packet for CustomReportDetails {
2303 const ID: i32 = id::CUSTOM_REPORT_DETAILS;
2304 const NAME: &'static str = "custom_report_details";
2305 const STATE: State = State::Play;
2306 const DIRECTION: Direction = Direction::Clientbound;
2307}
2308impl From<CustomReportDetails> for ClientboundPlayPacket {
2309 fn from(p: CustomReportDetails) -> Self {
2310 Self::CustomReportDetails(p)
2311 }
2312}
2313
2314pub type ServerLinks = crate::defs::p775::play::clientbound::ServerLinks<775>;
2316impl crate::packet::Packet for ServerLinks {
2317 const ID: i32 = id::SERVER_LINKS;
2318 const NAME: &'static str = "server_links";
2319 const STATE: State = State::Play;
2320 const DIRECTION: Direction = Direction::Clientbound;
2321}
2322impl From<ServerLinks> for ClientboundPlayPacket {
2323 fn from(p: ServerLinks) -> Self {
2324 Self::ServerLinks(p)
2325 }
2326}
2327
2328pub type TrackedWaypoint = crate::defs::p775::play::clientbound::TrackedWaypoint<775>;
2330impl crate::packet::Packet for TrackedWaypoint {
2331 const ID: i32 = id::TRACKED_WAYPOINT;
2332 const NAME: &'static str = "tracked_waypoint";
2333 const STATE: State = State::Play;
2334 const DIRECTION: Direction = Direction::Clientbound;
2335}
2336impl From<TrackedWaypoint> for ClientboundPlayPacket {
2337 fn from(p: TrackedWaypoint) -> Self {
2338 Self::TrackedWaypoint(p)
2339 }
2340}
2341
2342pub type ClearDialog = crate::defs::p775::play::clientbound::ClearDialog<775>;
2344impl crate::packet::Packet for ClearDialog {
2345 const ID: i32 = id::CLEAR_DIALOG;
2346 const NAME: &'static str = "clear_dialog";
2347 const STATE: State = State::Play;
2348 const DIRECTION: Direction = Direction::Clientbound;
2349}
2350impl From<ClearDialog> for ClientboundPlayPacket {
2351 fn from(p: ClearDialog) -> Self {
2352 Self::ClearDialog(p)
2353 }
2354}
2355
2356pub type ShowDialog = crate::defs::p775::play::clientbound::ShowDialog<775>;
2358impl crate::packet::Packet for ShowDialog {
2359 const ID: i32 = id::SHOW_DIALOG;
2360 const NAME: &'static str = "show_dialog";
2361 const STATE: State = State::Play;
2362 const DIRECTION: Direction = Direction::Clientbound;
2363}
2364impl From<ShowDialog> for ClientboundPlayPacket {
2365 fn from(p: ShowDialog) -> Self {
2366 Self::ShowDialog(p)
2367 }
2368}
2369
2370#[derive(Debug, Clone, PartialEq)]
2372pub enum ClientboundPlayPacket {
2373 BundleDelimiter(BundleDelimiter),
2375 SpawnEntity(SpawnEntity),
2377 Animation(Animation),
2379 Statistics(Statistics),
2381 AcknowledgePlayerDigging(AcknowledgePlayerDigging),
2383 BlockBreakAnimation(BlockBreakAnimation),
2385 TileEntityData(TileEntityData),
2387 BlockAction(BlockAction),
2389 BlockChange(BlockChange),
2391 BossBar(BossBar),
2393 Difficulty(Difficulty),
2395 ChunkBatchFinished(ChunkBatchFinished),
2397 ChunkBatchStart(ChunkBatchStart),
2399 ChunkBiomes(ChunkBiomes),
2401 ClearTitles(ClearTitles),
2403 TabComplete(TabComplete),
2405 DeclareCommands(DeclareCommands),
2407 CloseWindow(CloseWindow),
2409 WindowItems(WindowItems),
2411 CraftProgressBar(CraftProgressBar),
2413 SetSlot(SetSlot),
2415 CookieRequest(CookieRequest),
2417 SetCooldown(SetCooldown),
2419 ChatSuggestions(ChatSuggestions),
2421 CustomPayload(CustomPayload),
2423 DamageEvent(DamageEvent),
2425 DebugBlockValue(DebugBlockValue),
2427 DebugChunkValue(DebugChunkValue),
2429 DebugEntityValue(DebugEntityValue),
2431 DebugEvent(DebugEvent),
2433 DebugSample(DebugSample),
2435 HideMessage(HideMessage),
2437 KickDisconnect(KickDisconnect),
2439 ProfilelessChat(ProfilelessChat),
2441 EntityStatus(EntityStatus),
2443 SyncEntityPosition(SyncEntityPosition),
2445 Explosion(Explosion),
2447 UnloadChunk(UnloadChunk),
2449 GameStateChange(GameStateChange),
2451 GameRuleValues(GameRuleValues),
2453 GameTestHighlightPos(GameTestHighlightPos),
2455 OpenHorseWindow(OpenHorseWindow),
2457 HurtAnimation(HurtAnimation),
2459 InitializeWorldBorder(InitializeWorldBorder),
2461 KeepAlive(KeepAlive),
2463 MapChunk(MapChunk),
2465 WorldEvent(WorldEvent),
2467 WorldParticles(WorldParticles),
2469 UpdateLight(UpdateLight),
2471 Login(Login),
2473 LowDiskSpaceWarning(LowDiskSpaceWarning),
2475 Map(Map),
2477 TradeList(TradeList),
2479 RelEntityMove(RelEntityMove),
2481 EntityMoveLook(EntityMoveLook),
2483 MoveMinecart(MoveMinecart),
2485 EntityLook(EntityLook),
2487 VehicleMove(VehicleMove),
2489 OpenBook(OpenBook),
2491 OpenWindow(OpenWindow),
2493 OpenSignEntity(OpenSignEntity),
2495 Ping(Ping),
2497 PingResponse(PingResponse),
2499 CraftRecipeResponse(CraftRecipeResponse),
2501 Abilities(Abilities),
2503 PlayerChat(PlayerChat),
2505 EndCombatEvent(EndCombatEvent),
2507 EnterCombatEvent(EnterCombatEvent),
2509 DeathCombatEvent(DeathCombatEvent),
2511 PlayerRemove(PlayerRemove),
2513 PlayerInfo(PlayerInfo),
2515 FacePlayer(FacePlayer),
2517 Position(Position),
2519 PlayerRotation(PlayerRotation),
2521 RecipeBookAdd(RecipeBookAdd),
2523 RecipeBookRemove(RecipeBookRemove),
2525 RecipeBookSettings(RecipeBookSettings),
2527 EntityDestroy(EntityDestroy),
2529 RemoveEntityEffect(RemoveEntityEffect),
2531 ResetScore(ResetScore),
2533 RemoveResourcePack(RemoveResourcePack),
2535 AddResourcePack(AddResourcePack),
2537 Respawn(Respawn),
2539 EntityHeadRotation(EntityHeadRotation),
2541 MultiBlockChange(MultiBlockChange),
2543 SelectAdvancementTab(SelectAdvancementTab),
2545 ServerData(ServerData),
2547 ActionBar(ActionBar),
2549 WorldBorderCenter(WorldBorderCenter),
2551 WorldBorderLerpSize(WorldBorderLerpSize),
2553 WorldBorderSize(WorldBorderSize),
2555 WorldBorderWarningDelay(WorldBorderWarningDelay),
2557 WorldBorderWarningReach(WorldBorderWarningReach),
2559 Camera(Camera),
2561 UpdateViewPosition(UpdateViewPosition),
2563 UpdateViewDistance(UpdateViewDistance),
2565 SetCursorItem(SetCursorItem),
2567 SpawnPosition(SpawnPosition),
2569 ScoreboardDisplayObjective(ScoreboardDisplayObjective),
2571 EntityMetadata(EntityMetadata),
2573 AttachEntity(AttachEntity),
2575 EntityVelocity(EntityVelocity),
2577 EntityEquipment(EntityEquipment),
2579 Experience(Experience),
2581 UpdateHealth(UpdateHealth),
2583 HeldItemSlot(HeldItemSlot),
2585 ScoreboardObjective(ScoreboardObjective),
2587 SetPassengers(SetPassengers),
2589 SetPlayerInventory(SetPlayerInventory),
2591 Teams(Teams),
2593 ScoreboardScore(ScoreboardScore),
2595 SimulationDistance(SimulationDistance),
2597 SetTitleSubtitle(SetTitleSubtitle),
2599 UpdateTime(UpdateTime),
2601 SetTitleText(SetTitleText),
2603 SetTitleTime(SetTitleTime),
2605 EntitySoundEffect(EntitySoundEffect),
2607 SoundEffect(SoundEffect),
2609 StartConfiguration(StartConfiguration),
2611 StopSound(StopSound),
2613 StoreCookie(StoreCookie),
2615 SystemChat(SystemChat),
2617 PlayerlistHeader(PlayerlistHeader),
2619 NbtQueryResponse(NbtQueryResponse),
2621 Collect(Collect),
2623 EntityTeleport(EntityTeleport),
2625 TestInstanceBlockStatus(TestInstanceBlockStatus),
2627 SetTickingState(SetTickingState),
2629 StepTick(StepTick),
2631 Transfer(Transfer),
2633 Advancements(Advancements),
2635 EntityUpdateAttributes(EntityUpdateAttributes),
2637 EntityEffect(EntityEffect),
2639 DeclareRecipes(DeclareRecipes),
2641 Tags(Tags),
2643 SetProjectilePower(SetProjectilePower),
2645 CustomReportDetails(CustomReportDetails),
2647 ServerLinks(ServerLinks),
2649 TrackedWaypoint(TrackedWaypoint),
2651 ClearDialog(ClearDialog),
2653 ShowDialog(ShowDialog),
2655}
2656
2657impl PacketSet for ClientboundPlayPacket {
2658 const STATE: State = State::Play;
2659 const DIRECTION: Direction = Direction::Clientbound;
2660 fn decode_raw(raw: &RawPacket) -> DecodeResult<Self> {
2661 match raw.id {
2662 id::BUNDLE_DELIMITER => decode_exact(&raw.body).map(Self::BundleDelimiter),
2663 id::SPAWN_ENTITY => decode_exact(&raw.body).map(Self::SpawnEntity),
2664 id::ANIMATION => decode_exact(&raw.body).map(Self::Animation),
2665 id::STATISTICS => decode_exact(&raw.body).map(Self::Statistics),
2666 id::ACKNOWLEDGE_PLAYER_DIGGING => {
2667 decode_exact(&raw.body).map(Self::AcknowledgePlayerDigging)
2668 }
2669 id::BLOCK_BREAK_ANIMATION => decode_exact(&raw.body).map(Self::BlockBreakAnimation),
2670 id::TILE_ENTITY_DATA => decode_exact(&raw.body).map(Self::TileEntityData),
2671 id::BLOCK_ACTION => decode_exact(&raw.body).map(Self::BlockAction),
2672 id::BLOCK_CHANGE => decode_exact(&raw.body).map(Self::BlockChange),
2673 id::BOSS_BAR => decode_exact(&raw.body).map(Self::BossBar),
2674 id::DIFFICULTY => decode_exact(&raw.body).map(Self::Difficulty),
2675 id::CHUNK_BATCH_FINISHED => decode_exact(&raw.body).map(Self::ChunkBatchFinished),
2676 id::CHUNK_BATCH_START => decode_exact(&raw.body).map(Self::ChunkBatchStart),
2677 id::CHUNK_BIOMES => decode_exact(&raw.body).map(Self::ChunkBiomes),
2678 id::CLEAR_TITLES => decode_exact(&raw.body).map(Self::ClearTitles),
2679 id::TAB_COMPLETE => decode_exact(&raw.body).map(Self::TabComplete),
2680 id::DECLARE_COMMANDS => decode_exact(&raw.body).map(Self::DeclareCommands),
2681 id::CLOSE_WINDOW => decode_exact(&raw.body).map(Self::CloseWindow),
2682 id::WINDOW_ITEMS => decode_exact(&raw.body).map(Self::WindowItems),
2683 id::CRAFT_PROGRESS_BAR => decode_exact(&raw.body).map(Self::CraftProgressBar),
2684 id::SET_SLOT => decode_exact(&raw.body).map(Self::SetSlot),
2685 id::COOKIE_REQUEST => decode_exact(&raw.body).map(Self::CookieRequest),
2686 id::SET_COOLDOWN => decode_exact(&raw.body).map(Self::SetCooldown),
2687 id::CHAT_SUGGESTIONS => decode_exact(&raw.body).map(Self::ChatSuggestions),
2688 id::CUSTOM_PAYLOAD => decode_exact(&raw.body).map(Self::CustomPayload),
2689 id::DAMAGE_EVENT => decode_exact(&raw.body).map(Self::DamageEvent),
2690 id::DEBUG_BLOCK_VALUE => decode_exact(&raw.body).map(Self::DebugBlockValue),
2691 id::DEBUG_CHUNK_VALUE => decode_exact(&raw.body).map(Self::DebugChunkValue),
2692 id::DEBUG_ENTITY_VALUE => decode_exact(&raw.body).map(Self::DebugEntityValue),
2693 id::DEBUG_EVENT => decode_exact(&raw.body).map(Self::DebugEvent),
2694 id::DEBUG_SAMPLE => decode_exact(&raw.body).map(Self::DebugSample),
2695 id::HIDE_MESSAGE => decode_exact(&raw.body).map(Self::HideMessage),
2696 id::KICK_DISCONNECT => decode_exact(&raw.body).map(Self::KickDisconnect),
2697 id::PROFILELESS_CHAT => decode_exact(&raw.body).map(Self::ProfilelessChat),
2698 id::ENTITY_STATUS => decode_exact(&raw.body).map(Self::EntityStatus),
2699 id::SYNC_ENTITY_POSITION => decode_exact(&raw.body).map(Self::SyncEntityPosition),
2700 id::EXPLOSION => decode_exact(&raw.body).map(Self::Explosion),
2701 id::UNLOAD_CHUNK => decode_exact(&raw.body).map(Self::UnloadChunk),
2702 id::GAME_STATE_CHANGE => decode_exact(&raw.body).map(Self::GameStateChange),
2703 id::GAME_RULE_VALUES => decode_exact(&raw.body).map(Self::GameRuleValues),
2704 id::GAME_TEST_HIGHLIGHT_POS => decode_exact(&raw.body).map(Self::GameTestHighlightPos),
2705 id::OPEN_HORSE_WINDOW => decode_exact(&raw.body).map(Self::OpenHorseWindow),
2706 id::HURT_ANIMATION => decode_exact(&raw.body).map(Self::HurtAnimation),
2707 id::INITIALIZE_WORLD_BORDER => decode_exact(&raw.body).map(Self::InitializeWorldBorder),
2708 id::KEEP_ALIVE => decode_exact(&raw.body).map(Self::KeepAlive),
2709 id::MAP_CHUNK => decode_exact(&raw.body).map(Self::MapChunk),
2710 id::WORLD_EVENT => decode_exact(&raw.body).map(Self::WorldEvent),
2711 id::WORLD_PARTICLES => decode_exact(&raw.body).map(Self::WorldParticles),
2712 id::UPDATE_LIGHT => decode_exact(&raw.body).map(Self::UpdateLight),
2713 id::LOGIN => decode_exact(&raw.body).map(Self::Login),
2714 id::LOW_DISK_SPACE_WARNING => decode_exact(&raw.body).map(Self::LowDiskSpaceWarning),
2715 id::MAP => decode_exact(&raw.body).map(Self::Map),
2716 id::TRADE_LIST => decode_exact(&raw.body).map(Self::TradeList),
2717 id::REL_ENTITY_MOVE => decode_exact(&raw.body).map(Self::RelEntityMove),
2718 id::ENTITY_MOVE_LOOK => decode_exact(&raw.body).map(Self::EntityMoveLook),
2719 id::MOVE_MINECART => decode_exact(&raw.body).map(Self::MoveMinecart),
2720 id::ENTITY_LOOK => decode_exact(&raw.body).map(Self::EntityLook),
2721 id::VEHICLE_MOVE => decode_exact(&raw.body).map(Self::VehicleMove),
2722 id::OPEN_BOOK => decode_exact(&raw.body).map(Self::OpenBook),
2723 id::OPEN_WINDOW => decode_exact(&raw.body).map(Self::OpenWindow),
2724 id::OPEN_SIGN_ENTITY => decode_exact(&raw.body).map(Self::OpenSignEntity),
2725 id::PING => decode_exact(&raw.body).map(Self::Ping),
2726 id::PING_RESPONSE => decode_exact(&raw.body).map(Self::PingResponse),
2727 id::CRAFT_RECIPE_RESPONSE => decode_exact(&raw.body).map(Self::CraftRecipeResponse),
2728 id::ABILITIES => decode_exact(&raw.body).map(Self::Abilities),
2729 id::PLAYER_CHAT => decode_exact(&raw.body).map(Self::PlayerChat),
2730 id::END_COMBAT_EVENT => decode_exact(&raw.body).map(Self::EndCombatEvent),
2731 id::ENTER_COMBAT_EVENT => decode_exact(&raw.body).map(Self::EnterCombatEvent),
2732 id::DEATH_COMBAT_EVENT => decode_exact(&raw.body).map(Self::DeathCombatEvent),
2733 id::PLAYER_REMOVE => decode_exact(&raw.body).map(Self::PlayerRemove),
2734 id::PLAYER_INFO => decode_exact(&raw.body).map(Self::PlayerInfo),
2735 id::FACE_PLAYER => decode_exact(&raw.body).map(Self::FacePlayer),
2736 id::POSITION => decode_exact(&raw.body).map(Self::Position),
2737 id::PLAYER_ROTATION => decode_exact(&raw.body).map(Self::PlayerRotation),
2738 id::RECIPE_BOOK_ADD => decode_exact(&raw.body).map(Self::RecipeBookAdd),
2739 id::RECIPE_BOOK_REMOVE => decode_exact(&raw.body).map(Self::RecipeBookRemove),
2740 id::RECIPE_BOOK_SETTINGS => decode_exact(&raw.body).map(Self::RecipeBookSettings),
2741 id::ENTITY_DESTROY => decode_exact(&raw.body).map(Self::EntityDestroy),
2742 id::REMOVE_ENTITY_EFFECT => decode_exact(&raw.body).map(Self::RemoveEntityEffect),
2743 id::RESET_SCORE => decode_exact(&raw.body).map(Self::ResetScore),
2744 id::REMOVE_RESOURCE_PACK => decode_exact(&raw.body).map(Self::RemoveResourcePack),
2745 id::ADD_RESOURCE_PACK => decode_exact(&raw.body).map(Self::AddResourcePack),
2746 id::RESPAWN => decode_exact(&raw.body).map(Self::Respawn),
2747 id::ENTITY_HEAD_ROTATION => decode_exact(&raw.body).map(Self::EntityHeadRotation),
2748 id::MULTI_BLOCK_CHANGE => decode_exact(&raw.body).map(Self::MultiBlockChange),
2749 id::SELECT_ADVANCEMENT_TAB => decode_exact(&raw.body).map(Self::SelectAdvancementTab),
2750 id::SERVER_DATA => decode_exact(&raw.body).map(Self::ServerData),
2751 id::ACTION_BAR => decode_exact(&raw.body).map(Self::ActionBar),
2752 id::WORLD_BORDER_CENTER => decode_exact(&raw.body).map(Self::WorldBorderCenter),
2753 id::WORLD_BORDER_LERP_SIZE => decode_exact(&raw.body).map(Self::WorldBorderLerpSize),
2754 id::WORLD_BORDER_SIZE => decode_exact(&raw.body).map(Self::WorldBorderSize),
2755 id::WORLD_BORDER_WARNING_DELAY => {
2756 decode_exact(&raw.body).map(Self::WorldBorderWarningDelay)
2757 }
2758 id::WORLD_BORDER_WARNING_REACH => {
2759 decode_exact(&raw.body).map(Self::WorldBorderWarningReach)
2760 }
2761 id::CAMERA => decode_exact(&raw.body).map(Self::Camera),
2762 id::UPDATE_VIEW_POSITION => decode_exact(&raw.body).map(Self::UpdateViewPosition),
2763 id::UPDATE_VIEW_DISTANCE => decode_exact(&raw.body).map(Self::UpdateViewDistance),
2764 id::SET_CURSOR_ITEM => decode_exact(&raw.body).map(Self::SetCursorItem),
2765 id::SPAWN_POSITION => decode_exact(&raw.body).map(Self::SpawnPosition),
2766 id::SCOREBOARD_DISPLAY_OBJECTIVE => {
2767 decode_exact(&raw.body).map(Self::ScoreboardDisplayObjective)
2768 }
2769 id::ENTITY_METADATA => decode_exact(&raw.body).map(Self::EntityMetadata),
2770 id::ATTACH_ENTITY => decode_exact(&raw.body).map(Self::AttachEntity),
2771 id::ENTITY_VELOCITY => decode_exact(&raw.body).map(Self::EntityVelocity),
2772 id::ENTITY_EQUIPMENT => decode_exact(&raw.body).map(Self::EntityEquipment),
2773 id::EXPERIENCE => decode_exact(&raw.body).map(Self::Experience),
2774 id::UPDATE_HEALTH => decode_exact(&raw.body).map(Self::UpdateHealth),
2775 id::HELD_ITEM_SLOT => decode_exact(&raw.body).map(Self::HeldItemSlot),
2776 id::SCOREBOARD_OBJECTIVE => decode_exact(&raw.body).map(Self::ScoreboardObjective),
2777 id::SET_PASSENGERS => decode_exact(&raw.body).map(Self::SetPassengers),
2778 id::SET_PLAYER_INVENTORY => decode_exact(&raw.body).map(Self::SetPlayerInventory),
2779 id::TEAMS => decode_exact(&raw.body).map(Self::Teams),
2780 id::SCOREBOARD_SCORE => decode_exact(&raw.body).map(Self::ScoreboardScore),
2781 id::SIMULATION_DISTANCE => decode_exact(&raw.body).map(Self::SimulationDistance),
2782 id::SET_TITLE_SUBTITLE => decode_exact(&raw.body).map(Self::SetTitleSubtitle),
2783 id::UPDATE_TIME => decode_exact(&raw.body).map(Self::UpdateTime),
2784 id::SET_TITLE_TEXT => decode_exact(&raw.body).map(Self::SetTitleText),
2785 id::SET_TITLE_TIME => decode_exact(&raw.body).map(Self::SetTitleTime),
2786 id::ENTITY_SOUND_EFFECT => decode_exact(&raw.body).map(Self::EntitySoundEffect),
2787 id::SOUND_EFFECT => decode_exact(&raw.body).map(Self::SoundEffect),
2788 id::START_CONFIGURATION => decode_exact(&raw.body).map(Self::StartConfiguration),
2789 id::STOP_SOUND => decode_exact(&raw.body).map(Self::StopSound),
2790 id::STORE_COOKIE => decode_exact(&raw.body).map(Self::StoreCookie),
2791 id::SYSTEM_CHAT => decode_exact(&raw.body).map(Self::SystemChat),
2792 id::PLAYERLIST_HEADER => decode_exact(&raw.body).map(Self::PlayerlistHeader),
2793 id::NBT_QUERY_RESPONSE => decode_exact(&raw.body).map(Self::NbtQueryResponse),
2794 id::COLLECT => decode_exact(&raw.body).map(Self::Collect),
2795 id::ENTITY_TELEPORT => decode_exact(&raw.body).map(Self::EntityTeleport),
2796 id::TEST_INSTANCE_BLOCK_STATUS => {
2797 decode_exact(&raw.body).map(Self::TestInstanceBlockStatus)
2798 }
2799 id::SET_TICKING_STATE => decode_exact(&raw.body).map(Self::SetTickingState),
2800 id::STEP_TICK => decode_exact(&raw.body).map(Self::StepTick),
2801 id::TRANSFER => decode_exact(&raw.body).map(Self::Transfer),
2802 id::ADVANCEMENTS => decode_exact(&raw.body).map(Self::Advancements),
2803 id::ENTITY_UPDATE_ATTRIBUTES => {
2804 decode_exact(&raw.body).map(Self::EntityUpdateAttributes)
2805 }
2806 id::ENTITY_EFFECT => decode_exact(&raw.body).map(Self::EntityEffect),
2807 id::DECLARE_RECIPES => decode_exact(&raw.body).map(Self::DeclareRecipes),
2808 id::TAGS => decode_exact(&raw.body).map(Self::Tags),
2809 id::SET_PROJECTILE_POWER => decode_exact(&raw.body).map(Self::SetProjectilePower),
2810 id::CUSTOM_REPORT_DETAILS => decode_exact(&raw.body).map(Self::CustomReportDetails),
2811 id::SERVER_LINKS => decode_exact(&raw.body).map(Self::ServerLinks),
2812 id::TRACKED_WAYPOINT => decode_exact(&raw.body).map(Self::TrackedWaypoint),
2813 id::CLEAR_DIALOG => decode_exact(&raw.body).map(Self::ClearDialog),
2814 id::SHOW_DIALOG => decode_exact(&raw.body).map(Self::ShowDialog),
2815 other => Err(DecodeError::UnknownPacketId(other)),
2816 }
2817 }
2818 fn id(&self) -> i32 {
2819 match *self {
2820 Self::BundleDelimiter(_) => id::BUNDLE_DELIMITER,
2821 Self::SpawnEntity(_) => id::SPAWN_ENTITY,
2822 Self::Animation(_) => id::ANIMATION,
2823 Self::Statistics(_) => id::STATISTICS,
2824 Self::AcknowledgePlayerDigging(_) => id::ACKNOWLEDGE_PLAYER_DIGGING,
2825 Self::BlockBreakAnimation(_) => id::BLOCK_BREAK_ANIMATION,
2826 Self::TileEntityData(_) => id::TILE_ENTITY_DATA,
2827 Self::BlockAction(_) => id::BLOCK_ACTION,
2828 Self::BlockChange(_) => id::BLOCK_CHANGE,
2829 Self::BossBar(_) => id::BOSS_BAR,
2830 Self::Difficulty(_) => id::DIFFICULTY,
2831 Self::ChunkBatchFinished(_) => id::CHUNK_BATCH_FINISHED,
2832 Self::ChunkBatchStart(_) => id::CHUNK_BATCH_START,
2833 Self::ChunkBiomes(_) => id::CHUNK_BIOMES,
2834 Self::ClearTitles(_) => id::CLEAR_TITLES,
2835 Self::TabComplete(_) => id::TAB_COMPLETE,
2836 Self::DeclareCommands(_) => id::DECLARE_COMMANDS,
2837 Self::CloseWindow(_) => id::CLOSE_WINDOW,
2838 Self::WindowItems(_) => id::WINDOW_ITEMS,
2839 Self::CraftProgressBar(_) => id::CRAFT_PROGRESS_BAR,
2840 Self::SetSlot(_) => id::SET_SLOT,
2841 Self::CookieRequest(_) => id::COOKIE_REQUEST,
2842 Self::SetCooldown(_) => id::SET_COOLDOWN,
2843 Self::ChatSuggestions(_) => id::CHAT_SUGGESTIONS,
2844 Self::CustomPayload(_) => id::CUSTOM_PAYLOAD,
2845 Self::DamageEvent(_) => id::DAMAGE_EVENT,
2846 Self::DebugBlockValue(_) => id::DEBUG_BLOCK_VALUE,
2847 Self::DebugChunkValue(_) => id::DEBUG_CHUNK_VALUE,
2848 Self::DebugEntityValue(_) => id::DEBUG_ENTITY_VALUE,
2849 Self::DebugEvent(_) => id::DEBUG_EVENT,
2850 Self::DebugSample(_) => id::DEBUG_SAMPLE,
2851 Self::HideMessage(_) => id::HIDE_MESSAGE,
2852 Self::KickDisconnect(_) => id::KICK_DISCONNECT,
2853 Self::ProfilelessChat(_) => id::PROFILELESS_CHAT,
2854 Self::EntityStatus(_) => id::ENTITY_STATUS,
2855 Self::SyncEntityPosition(_) => id::SYNC_ENTITY_POSITION,
2856 Self::Explosion(_) => id::EXPLOSION,
2857 Self::UnloadChunk(_) => id::UNLOAD_CHUNK,
2858 Self::GameStateChange(_) => id::GAME_STATE_CHANGE,
2859 Self::GameRuleValues(_) => id::GAME_RULE_VALUES,
2860 Self::GameTestHighlightPos(_) => id::GAME_TEST_HIGHLIGHT_POS,
2861 Self::OpenHorseWindow(_) => id::OPEN_HORSE_WINDOW,
2862 Self::HurtAnimation(_) => id::HURT_ANIMATION,
2863 Self::InitializeWorldBorder(_) => id::INITIALIZE_WORLD_BORDER,
2864 Self::KeepAlive(_) => id::KEEP_ALIVE,
2865 Self::MapChunk(_) => id::MAP_CHUNK,
2866 Self::WorldEvent(_) => id::WORLD_EVENT,
2867 Self::WorldParticles(_) => id::WORLD_PARTICLES,
2868 Self::UpdateLight(_) => id::UPDATE_LIGHT,
2869 Self::Login(_) => id::LOGIN,
2870 Self::LowDiskSpaceWarning(_) => id::LOW_DISK_SPACE_WARNING,
2871 Self::Map(_) => id::MAP,
2872 Self::TradeList(_) => id::TRADE_LIST,
2873 Self::RelEntityMove(_) => id::REL_ENTITY_MOVE,
2874 Self::EntityMoveLook(_) => id::ENTITY_MOVE_LOOK,
2875 Self::MoveMinecart(_) => id::MOVE_MINECART,
2876 Self::EntityLook(_) => id::ENTITY_LOOK,
2877 Self::VehicleMove(_) => id::VEHICLE_MOVE,
2878 Self::OpenBook(_) => id::OPEN_BOOK,
2879 Self::OpenWindow(_) => id::OPEN_WINDOW,
2880 Self::OpenSignEntity(_) => id::OPEN_SIGN_ENTITY,
2881 Self::Ping(_) => id::PING,
2882 Self::PingResponse(_) => id::PING_RESPONSE,
2883 Self::CraftRecipeResponse(_) => id::CRAFT_RECIPE_RESPONSE,
2884 Self::Abilities(_) => id::ABILITIES,
2885 Self::PlayerChat(_) => id::PLAYER_CHAT,
2886 Self::EndCombatEvent(_) => id::END_COMBAT_EVENT,
2887 Self::EnterCombatEvent(_) => id::ENTER_COMBAT_EVENT,
2888 Self::DeathCombatEvent(_) => id::DEATH_COMBAT_EVENT,
2889 Self::PlayerRemove(_) => id::PLAYER_REMOVE,
2890 Self::PlayerInfo(_) => id::PLAYER_INFO,
2891 Self::FacePlayer(_) => id::FACE_PLAYER,
2892 Self::Position(_) => id::POSITION,
2893 Self::PlayerRotation(_) => id::PLAYER_ROTATION,
2894 Self::RecipeBookAdd(_) => id::RECIPE_BOOK_ADD,
2895 Self::RecipeBookRemove(_) => id::RECIPE_BOOK_REMOVE,
2896 Self::RecipeBookSettings(_) => id::RECIPE_BOOK_SETTINGS,
2897 Self::EntityDestroy(_) => id::ENTITY_DESTROY,
2898 Self::RemoveEntityEffect(_) => id::REMOVE_ENTITY_EFFECT,
2899 Self::ResetScore(_) => id::RESET_SCORE,
2900 Self::RemoveResourcePack(_) => id::REMOVE_RESOURCE_PACK,
2901 Self::AddResourcePack(_) => id::ADD_RESOURCE_PACK,
2902 Self::Respawn(_) => id::RESPAWN,
2903 Self::EntityHeadRotation(_) => id::ENTITY_HEAD_ROTATION,
2904 Self::MultiBlockChange(_) => id::MULTI_BLOCK_CHANGE,
2905 Self::SelectAdvancementTab(_) => id::SELECT_ADVANCEMENT_TAB,
2906 Self::ServerData(_) => id::SERVER_DATA,
2907 Self::ActionBar(_) => id::ACTION_BAR,
2908 Self::WorldBorderCenter(_) => id::WORLD_BORDER_CENTER,
2909 Self::WorldBorderLerpSize(_) => id::WORLD_BORDER_LERP_SIZE,
2910 Self::WorldBorderSize(_) => id::WORLD_BORDER_SIZE,
2911 Self::WorldBorderWarningDelay(_) => id::WORLD_BORDER_WARNING_DELAY,
2912 Self::WorldBorderWarningReach(_) => id::WORLD_BORDER_WARNING_REACH,
2913 Self::Camera(_) => id::CAMERA,
2914 Self::UpdateViewPosition(_) => id::UPDATE_VIEW_POSITION,
2915 Self::UpdateViewDistance(_) => id::UPDATE_VIEW_DISTANCE,
2916 Self::SetCursorItem(_) => id::SET_CURSOR_ITEM,
2917 Self::SpawnPosition(_) => id::SPAWN_POSITION,
2918 Self::ScoreboardDisplayObjective(_) => id::SCOREBOARD_DISPLAY_OBJECTIVE,
2919 Self::EntityMetadata(_) => id::ENTITY_METADATA,
2920 Self::AttachEntity(_) => id::ATTACH_ENTITY,
2921 Self::EntityVelocity(_) => id::ENTITY_VELOCITY,
2922 Self::EntityEquipment(_) => id::ENTITY_EQUIPMENT,
2923 Self::Experience(_) => id::EXPERIENCE,
2924 Self::UpdateHealth(_) => id::UPDATE_HEALTH,
2925 Self::HeldItemSlot(_) => id::HELD_ITEM_SLOT,
2926 Self::ScoreboardObjective(_) => id::SCOREBOARD_OBJECTIVE,
2927 Self::SetPassengers(_) => id::SET_PASSENGERS,
2928 Self::SetPlayerInventory(_) => id::SET_PLAYER_INVENTORY,
2929 Self::Teams(_) => id::TEAMS,
2930 Self::ScoreboardScore(_) => id::SCOREBOARD_SCORE,
2931 Self::SimulationDistance(_) => id::SIMULATION_DISTANCE,
2932 Self::SetTitleSubtitle(_) => id::SET_TITLE_SUBTITLE,
2933 Self::UpdateTime(_) => id::UPDATE_TIME,
2934 Self::SetTitleText(_) => id::SET_TITLE_TEXT,
2935 Self::SetTitleTime(_) => id::SET_TITLE_TIME,
2936 Self::EntitySoundEffect(_) => id::ENTITY_SOUND_EFFECT,
2937 Self::SoundEffect(_) => id::SOUND_EFFECT,
2938 Self::StartConfiguration(_) => id::START_CONFIGURATION,
2939 Self::StopSound(_) => id::STOP_SOUND,
2940 Self::StoreCookie(_) => id::STORE_COOKIE,
2941 Self::SystemChat(_) => id::SYSTEM_CHAT,
2942 Self::PlayerlistHeader(_) => id::PLAYERLIST_HEADER,
2943 Self::NbtQueryResponse(_) => id::NBT_QUERY_RESPONSE,
2944 Self::Collect(_) => id::COLLECT,
2945 Self::EntityTeleport(_) => id::ENTITY_TELEPORT,
2946 Self::TestInstanceBlockStatus(_) => id::TEST_INSTANCE_BLOCK_STATUS,
2947 Self::SetTickingState(_) => id::SET_TICKING_STATE,
2948 Self::StepTick(_) => id::STEP_TICK,
2949 Self::Transfer(_) => id::TRANSFER,
2950 Self::Advancements(_) => id::ADVANCEMENTS,
2951 Self::EntityUpdateAttributes(_) => id::ENTITY_UPDATE_ATTRIBUTES,
2952 Self::EntityEffect(_) => id::ENTITY_EFFECT,
2953 Self::DeclareRecipes(_) => id::DECLARE_RECIPES,
2954 Self::Tags(_) => id::TAGS,
2955 Self::SetProjectilePower(_) => id::SET_PROJECTILE_POWER,
2956 Self::CustomReportDetails(_) => id::CUSTOM_REPORT_DETAILS,
2957 Self::ServerLinks(_) => id::SERVER_LINKS,
2958 Self::TrackedWaypoint(_) => id::TRACKED_WAYPOINT,
2959 Self::ClearDialog(_) => id::CLEAR_DIALOG,
2960 Self::ShowDialog(_) => id::SHOW_DIALOG,
2961 }
2962 }
2963 fn name(&self) -> &'static str {
2964 match *self {
2965 Self::BundleDelimiter(_) => "bundle_delimiter",
2966 Self::SpawnEntity(_) => "spawn_entity",
2967 Self::Animation(_) => "animation",
2968 Self::Statistics(_) => "statistics",
2969 Self::AcknowledgePlayerDigging(_) => "acknowledge_player_digging",
2970 Self::BlockBreakAnimation(_) => "block_break_animation",
2971 Self::TileEntityData(_) => "tile_entity_data",
2972 Self::BlockAction(_) => "block_action",
2973 Self::BlockChange(_) => "block_change",
2974 Self::BossBar(_) => "boss_bar",
2975 Self::Difficulty(_) => "difficulty",
2976 Self::ChunkBatchFinished(_) => "chunk_batch_finished",
2977 Self::ChunkBatchStart(_) => "chunk_batch_start",
2978 Self::ChunkBiomes(_) => "chunk_biomes",
2979 Self::ClearTitles(_) => "clear_titles",
2980 Self::TabComplete(_) => "tab_complete",
2981 Self::DeclareCommands(_) => "declare_commands",
2982 Self::CloseWindow(_) => "close_window",
2983 Self::WindowItems(_) => "window_items",
2984 Self::CraftProgressBar(_) => "craft_progress_bar",
2985 Self::SetSlot(_) => "set_slot",
2986 Self::CookieRequest(_) => "cookie_request",
2987 Self::SetCooldown(_) => "set_cooldown",
2988 Self::ChatSuggestions(_) => "chat_suggestions",
2989 Self::CustomPayload(_) => "custom_payload",
2990 Self::DamageEvent(_) => "damage_event",
2991 Self::DebugBlockValue(_) => "debug_block_value",
2992 Self::DebugChunkValue(_) => "debug_chunk_value",
2993 Self::DebugEntityValue(_) => "debug_entity_value",
2994 Self::DebugEvent(_) => "debug_event",
2995 Self::DebugSample(_) => "debug_sample",
2996 Self::HideMessage(_) => "hide_message",
2997 Self::KickDisconnect(_) => "kick_disconnect",
2998 Self::ProfilelessChat(_) => "profileless_chat",
2999 Self::EntityStatus(_) => "entity_status",
3000 Self::SyncEntityPosition(_) => "sync_entity_position",
3001 Self::Explosion(_) => "explosion",
3002 Self::UnloadChunk(_) => "unload_chunk",
3003 Self::GameStateChange(_) => "game_state_change",
3004 Self::GameRuleValues(_) => "game_rule_values",
3005 Self::GameTestHighlightPos(_) => "game_test_highlight_pos",
3006 Self::OpenHorseWindow(_) => "open_horse_window",
3007 Self::HurtAnimation(_) => "hurt_animation",
3008 Self::InitializeWorldBorder(_) => "initialize_world_border",
3009 Self::KeepAlive(_) => "keep_alive",
3010 Self::MapChunk(_) => "map_chunk",
3011 Self::WorldEvent(_) => "world_event",
3012 Self::WorldParticles(_) => "world_particles",
3013 Self::UpdateLight(_) => "update_light",
3014 Self::Login(_) => "login",
3015 Self::LowDiskSpaceWarning(_) => "low_disk_space_warning",
3016 Self::Map(_) => "map",
3017 Self::TradeList(_) => "trade_list",
3018 Self::RelEntityMove(_) => "rel_entity_move",
3019 Self::EntityMoveLook(_) => "entity_move_look",
3020 Self::MoveMinecart(_) => "move_minecart",
3021 Self::EntityLook(_) => "entity_look",
3022 Self::VehicleMove(_) => "vehicle_move",
3023 Self::OpenBook(_) => "open_book",
3024 Self::OpenWindow(_) => "open_window",
3025 Self::OpenSignEntity(_) => "open_sign_entity",
3026 Self::Ping(_) => "ping",
3027 Self::PingResponse(_) => "ping_response",
3028 Self::CraftRecipeResponse(_) => "craft_recipe_response",
3029 Self::Abilities(_) => "abilities",
3030 Self::PlayerChat(_) => "player_chat",
3031 Self::EndCombatEvent(_) => "end_combat_event",
3032 Self::EnterCombatEvent(_) => "enter_combat_event",
3033 Self::DeathCombatEvent(_) => "death_combat_event",
3034 Self::PlayerRemove(_) => "player_remove",
3035 Self::PlayerInfo(_) => "player_info",
3036 Self::FacePlayer(_) => "face_player",
3037 Self::Position(_) => "position",
3038 Self::PlayerRotation(_) => "player_rotation",
3039 Self::RecipeBookAdd(_) => "recipe_book_add",
3040 Self::RecipeBookRemove(_) => "recipe_book_remove",
3041 Self::RecipeBookSettings(_) => "recipe_book_settings",
3042 Self::EntityDestroy(_) => "entity_destroy",
3043 Self::RemoveEntityEffect(_) => "remove_entity_effect",
3044 Self::ResetScore(_) => "reset_score",
3045 Self::RemoveResourcePack(_) => "remove_resource_pack",
3046 Self::AddResourcePack(_) => "add_resource_pack",
3047 Self::Respawn(_) => "respawn",
3048 Self::EntityHeadRotation(_) => "entity_head_rotation",
3049 Self::MultiBlockChange(_) => "multi_block_change",
3050 Self::SelectAdvancementTab(_) => "select_advancement_tab",
3051 Self::ServerData(_) => "server_data",
3052 Self::ActionBar(_) => "action_bar",
3053 Self::WorldBorderCenter(_) => "world_border_center",
3054 Self::WorldBorderLerpSize(_) => "world_border_lerp_size",
3055 Self::WorldBorderSize(_) => "world_border_size",
3056 Self::WorldBorderWarningDelay(_) => "world_border_warning_delay",
3057 Self::WorldBorderWarningReach(_) => "world_border_warning_reach",
3058 Self::Camera(_) => "camera",
3059 Self::UpdateViewPosition(_) => "update_view_position",
3060 Self::UpdateViewDistance(_) => "update_view_distance",
3061 Self::SetCursorItem(_) => "set_cursor_item",
3062 Self::SpawnPosition(_) => "spawn_position",
3063 Self::ScoreboardDisplayObjective(_) => "scoreboard_display_objective",
3064 Self::EntityMetadata(_) => "entity_metadata",
3065 Self::AttachEntity(_) => "attach_entity",
3066 Self::EntityVelocity(_) => "entity_velocity",
3067 Self::EntityEquipment(_) => "entity_equipment",
3068 Self::Experience(_) => "experience",
3069 Self::UpdateHealth(_) => "update_health",
3070 Self::HeldItemSlot(_) => "held_item_slot",
3071 Self::ScoreboardObjective(_) => "scoreboard_objective",
3072 Self::SetPassengers(_) => "set_passengers",
3073 Self::SetPlayerInventory(_) => "set_player_inventory",
3074 Self::Teams(_) => "teams",
3075 Self::ScoreboardScore(_) => "scoreboard_score",
3076 Self::SimulationDistance(_) => "simulation_distance",
3077 Self::SetTitleSubtitle(_) => "set_title_subtitle",
3078 Self::UpdateTime(_) => "update_time",
3079 Self::SetTitleText(_) => "set_title_text",
3080 Self::SetTitleTime(_) => "set_title_time",
3081 Self::EntitySoundEffect(_) => "entity_sound_effect",
3082 Self::SoundEffect(_) => "sound_effect",
3083 Self::StartConfiguration(_) => "start_configuration",
3084 Self::StopSound(_) => "stop_sound",
3085 Self::StoreCookie(_) => "store_cookie",
3086 Self::SystemChat(_) => "system_chat",
3087 Self::PlayerlistHeader(_) => "playerlist_header",
3088 Self::NbtQueryResponse(_) => "nbt_query_response",
3089 Self::Collect(_) => "collect",
3090 Self::EntityTeleport(_) => "entity_teleport",
3091 Self::TestInstanceBlockStatus(_) => "test_instance_block_status",
3092 Self::SetTickingState(_) => "set_ticking_state",
3093 Self::StepTick(_) => "step_tick",
3094 Self::Transfer(_) => "transfer",
3095 Self::Advancements(_) => "advancements",
3096 Self::EntityUpdateAttributes(_) => "entity_update_attributes",
3097 Self::EntityEffect(_) => "entity_effect",
3098 Self::DeclareRecipes(_) => "declare_recipes",
3099 Self::Tags(_) => "tags",
3100 Self::SetProjectilePower(_) => "set_projectile_power",
3101 Self::CustomReportDetails(_) => "custom_report_details",
3102 Self::ServerLinks(_) => "server_links",
3103 Self::TrackedWaypoint(_) => "tracked_waypoint",
3104 Self::ClearDialog(_) => "clear_dialog",
3105 Self::ShowDialog(_) => "show_dialog",
3106 }
3107 }
3108 fn encode_body(&self, w: &mut BytesMut) -> EncodeResult {
3109 match *self {
3110 Self::BundleDelimiter(ref p) => p.encode(w),
3111 Self::SpawnEntity(ref p) => p.encode(w),
3112 Self::Animation(ref p) => p.encode(w),
3113 Self::Statistics(ref p) => p.encode(w),
3114 Self::AcknowledgePlayerDigging(ref p) => p.encode(w),
3115 Self::BlockBreakAnimation(ref p) => p.encode(w),
3116 Self::TileEntityData(ref p) => p.encode(w),
3117 Self::BlockAction(ref p) => p.encode(w),
3118 Self::BlockChange(ref p) => p.encode(w),
3119 Self::BossBar(ref p) => p.encode(w),
3120 Self::Difficulty(ref p) => p.encode(w),
3121 Self::ChunkBatchFinished(ref p) => p.encode(w),
3122 Self::ChunkBatchStart(ref p) => p.encode(w),
3123 Self::ChunkBiomes(ref p) => p.encode(w),
3124 Self::ClearTitles(ref p) => p.encode(w),
3125 Self::TabComplete(ref p) => p.encode(w),
3126 Self::DeclareCommands(ref p) => p.encode(w),
3127 Self::CloseWindow(ref p) => p.encode(w),
3128 Self::WindowItems(ref p) => p.encode(w),
3129 Self::CraftProgressBar(ref p) => p.encode(w),
3130 Self::SetSlot(ref p) => p.encode(w),
3131 Self::CookieRequest(ref p) => p.encode(w),
3132 Self::SetCooldown(ref p) => p.encode(w),
3133 Self::ChatSuggestions(ref p) => p.encode(w),
3134 Self::CustomPayload(ref p) => p.encode(w),
3135 Self::DamageEvent(ref p) => p.encode(w),
3136 Self::DebugBlockValue(ref p) => p.encode(w),
3137 Self::DebugChunkValue(ref p) => p.encode(w),
3138 Self::DebugEntityValue(ref p) => p.encode(w),
3139 Self::DebugEvent(ref p) => p.encode(w),
3140 Self::DebugSample(ref p) => p.encode(w),
3141 Self::HideMessage(ref p) => p.encode(w),
3142 Self::KickDisconnect(ref p) => p.encode(w),
3143 Self::ProfilelessChat(ref p) => p.encode(w),
3144 Self::EntityStatus(ref p) => p.encode(w),
3145 Self::SyncEntityPosition(ref p) => p.encode(w),
3146 Self::Explosion(ref p) => p.encode(w),
3147 Self::UnloadChunk(ref p) => p.encode(w),
3148 Self::GameStateChange(ref p) => p.encode(w),
3149 Self::GameRuleValues(ref p) => p.encode(w),
3150 Self::GameTestHighlightPos(ref p) => p.encode(w),
3151 Self::OpenHorseWindow(ref p) => p.encode(w),
3152 Self::HurtAnimation(ref p) => p.encode(w),
3153 Self::InitializeWorldBorder(ref p) => p.encode(w),
3154 Self::KeepAlive(ref p) => p.encode(w),
3155 Self::MapChunk(ref p) => p.encode(w),
3156 Self::WorldEvent(ref p) => p.encode(w),
3157 Self::WorldParticles(ref p) => p.encode(w),
3158 Self::UpdateLight(ref p) => p.encode(w),
3159 Self::Login(ref p) => p.encode(w),
3160 Self::LowDiskSpaceWarning(ref p) => p.encode(w),
3161 Self::Map(ref p) => p.encode(w),
3162 Self::TradeList(ref p) => p.encode(w),
3163 Self::RelEntityMove(ref p) => p.encode(w),
3164 Self::EntityMoveLook(ref p) => p.encode(w),
3165 Self::MoveMinecart(ref p) => p.encode(w),
3166 Self::EntityLook(ref p) => p.encode(w),
3167 Self::VehicleMove(ref p) => p.encode(w),
3168 Self::OpenBook(ref p) => p.encode(w),
3169 Self::OpenWindow(ref p) => p.encode(w),
3170 Self::OpenSignEntity(ref p) => p.encode(w),
3171 Self::Ping(ref p) => p.encode(w),
3172 Self::PingResponse(ref p) => p.encode(w),
3173 Self::CraftRecipeResponse(ref p) => p.encode(w),
3174 Self::Abilities(ref p) => p.encode(w),
3175 Self::PlayerChat(ref p) => p.encode(w),
3176 Self::EndCombatEvent(ref p) => p.encode(w),
3177 Self::EnterCombatEvent(ref p) => p.encode(w),
3178 Self::DeathCombatEvent(ref p) => p.encode(w),
3179 Self::PlayerRemove(ref p) => p.encode(w),
3180 Self::PlayerInfo(ref p) => p.encode(w),
3181 Self::FacePlayer(ref p) => p.encode(w),
3182 Self::Position(ref p) => p.encode(w),
3183 Self::PlayerRotation(ref p) => p.encode(w),
3184 Self::RecipeBookAdd(ref p) => p.encode(w),
3185 Self::RecipeBookRemove(ref p) => p.encode(w),
3186 Self::RecipeBookSettings(ref p) => p.encode(w),
3187 Self::EntityDestroy(ref p) => p.encode(w),
3188 Self::RemoveEntityEffect(ref p) => p.encode(w),
3189 Self::ResetScore(ref p) => p.encode(w),
3190 Self::RemoveResourcePack(ref p) => p.encode(w),
3191 Self::AddResourcePack(ref p) => p.encode(w),
3192 Self::Respawn(ref p) => p.encode(w),
3193 Self::EntityHeadRotation(ref p) => p.encode(w),
3194 Self::MultiBlockChange(ref p) => p.encode(w),
3195 Self::SelectAdvancementTab(ref p) => p.encode(w),
3196 Self::ServerData(ref p) => p.encode(w),
3197 Self::ActionBar(ref p) => p.encode(w),
3198 Self::WorldBorderCenter(ref p) => p.encode(w),
3199 Self::WorldBorderLerpSize(ref p) => p.encode(w),
3200 Self::WorldBorderSize(ref p) => p.encode(w),
3201 Self::WorldBorderWarningDelay(ref p) => p.encode(w),
3202 Self::WorldBorderWarningReach(ref p) => p.encode(w),
3203 Self::Camera(ref p) => p.encode(w),
3204 Self::UpdateViewPosition(ref p) => p.encode(w),
3205 Self::UpdateViewDistance(ref p) => p.encode(w),
3206 Self::SetCursorItem(ref p) => p.encode(w),
3207 Self::SpawnPosition(ref p) => p.encode(w),
3208 Self::ScoreboardDisplayObjective(ref p) => p.encode(w),
3209 Self::EntityMetadata(ref p) => p.encode(w),
3210 Self::AttachEntity(ref p) => p.encode(w),
3211 Self::EntityVelocity(ref p) => p.encode(w),
3212 Self::EntityEquipment(ref p) => p.encode(w),
3213 Self::Experience(ref p) => p.encode(w),
3214 Self::UpdateHealth(ref p) => p.encode(w),
3215 Self::HeldItemSlot(ref p) => p.encode(w),
3216 Self::ScoreboardObjective(ref p) => p.encode(w),
3217 Self::SetPassengers(ref p) => p.encode(w),
3218 Self::SetPlayerInventory(ref p) => p.encode(w),
3219 Self::Teams(ref p) => p.encode(w),
3220 Self::ScoreboardScore(ref p) => p.encode(w),
3221 Self::SimulationDistance(ref p) => p.encode(w),
3222 Self::SetTitleSubtitle(ref p) => p.encode(w),
3223 Self::UpdateTime(ref p) => p.encode(w),
3224 Self::SetTitleText(ref p) => p.encode(w),
3225 Self::SetTitleTime(ref p) => p.encode(w),
3226 Self::EntitySoundEffect(ref p) => p.encode(w),
3227 Self::SoundEffect(ref p) => p.encode(w),
3228 Self::StartConfiguration(ref p) => p.encode(w),
3229 Self::StopSound(ref p) => p.encode(w),
3230 Self::StoreCookie(ref p) => p.encode(w),
3231 Self::SystemChat(ref p) => p.encode(w),
3232 Self::PlayerlistHeader(ref p) => p.encode(w),
3233 Self::NbtQueryResponse(ref p) => p.encode(w),
3234 Self::Collect(ref p) => p.encode(w),
3235 Self::EntityTeleport(ref p) => p.encode(w),
3236 Self::TestInstanceBlockStatus(ref p) => p.encode(w),
3237 Self::SetTickingState(ref p) => p.encode(w),
3238 Self::StepTick(ref p) => p.encode(w),
3239 Self::Transfer(ref p) => p.encode(w),
3240 Self::Advancements(ref p) => p.encode(w),
3241 Self::EntityUpdateAttributes(ref p) => p.encode(w),
3242 Self::EntityEffect(ref p) => p.encode(w),
3243 Self::DeclareRecipes(ref p) => p.encode(w),
3244 Self::Tags(ref p) => p.encode(w),
3245 Self::SetProjectilePower(ref p) => p.encode(w),
3246 Self::CustomReportDetails(ref p) => p.encode(w),
3247 Self::ServerLinks(ref p) => p.encode(w),
3248 Self::TrackedWaypoint(ref p) => p.encode(w),
3249 Self::ClearDialog(ref p) => p.encode(w),
3250 Self::ShowDialog(ref p) => p.encode(w),
3251 }
3252 }
3253 fn name_of(id: i32) -> Option<&'static str> {
3254 match id {
3255 id::BUNDLE_DELIMITER => Some("bundle_delimiter"),
3256 id::SPAWN_ENTITY => Some("spawn_entity"),
3257 id::ANIMATION => Some("animation"),
3258 id::STATISTICS => Some("statistics"),
3259 id::ACKNOWLEDGE_PLAYER_DIGGING => Some("acknowledge_player_digging"),
3260 id::BLOCK_BREAK_ANIMATION => Some("block_break_animation"),
3261 id::TILE_ENTITY_DATA => Some("tile_entity_data"),
3262 id::BLOCK_ACTION => Some("block_action"),
3263 id::BLOCK_CHANGE => Some("block_change"),
3264 id::BOSS_BAR => Some("boss_bar"),
3265 id::DIFFICULTY => Some("difficulty"),
3266 id::CHUNK_BATCH_FINISHED => Some("chunk_batch_finished"),
3267 id::CHUNK_BATCH_START => Some("chunk_batch_start"),
3268 id::CHUNK_BIOMES => Some("chunk_biomes"),
3269 id::CLEAR_TITLES => Some("clear_titles"),
3270 id::TAB_COMPLETE => Some("tab_complete"),
3271 id::DECLARE_COMMANDS => Some("declare_commands"),
3272 id::CLOSE_WINDOW => Some("close_window"),
3273 id::WINDOW_ITEMS => Some("window_items"),
3274 id::CRAFT_PROGRESS_BAR => Some("craft_progress_bar"),
3275 id::SET_SLOT => Some("set_slot"),
3276 id::COOKIE_REQUEST => Some("cookie_request"),
3277 id::SET_COOLDOWN => Some("set_cooldown"),
3278 id::CHAT_SUGGESTIONS => Some("chat_suggestions"),
3279 id::CUSTOM_PAYLOAD => Some("custom_payload"),
3280 id::DAMAGE_EVENT => Some("damage_event"),
3281 id::DEBUG_BLOCK_VALUE => Some("debug_block_value"),
3282 id::DEBUG_CHUNK_VALUE => Some("debug_chunk_value"),
3283 id::DEBUG_ENTITY_VALUE => Some("debug_entity_value"),
3284 id::DEBUG_EVENT => Some("debug_event"),
3285 id::DEBUG_SAMPLE => Some("debug_sample"),
3286 id::HIDE_MESSAGE => Some("hide_message"),
3287 id::KICK_DISCONNECT => Some("kick_disconnect"),
3288 id::PROFILELESS_CHAT => Some("profileless_chat"),
3289 id::ENTITY_STATUS => Some("entity_status"),
3290 id::SYNC_ENTITY_POSITION => Some("sync_entity_position"),
3291 id::EXPLOSION => Some("explosion"),
3292 id::UNLOAD_CHUNK => Some("unload_chunk"),
3293 id::GAME_STATE_CHANGE => Some("game_state_change"),
3294 id::GAME_RULE_VALUES => Some("game_rule_values"),
3295 id::GAME_TEST_HIGHLIGHT_POS => Some("game_test_highlight_pos"),
3296 id::OPEN_HORSE_WINDOW => Some("open_horse_window"),
3297 id::HURT_ANIMATION => Some("hurt_animation"),
3298 id::INITIALIZE_WORLD_BORDER => Some("initialize_world_border"),
3299 id::KEEP_ALIVE => Some("keep_alive"),
3300 id::MAP_CHUNK => Some("map_chunk"),
3301 id::WORLD_EVENT => Some("world_event"),
3302 id::WORLD_PARTICLES => Some("world_particles"),
3303 id::UPDATE_LIGHT => Some("update_light"),
3304 id::LOGIN => Some("login"),
3305 id::LOW_DISK_SPACE_WARNING => Some("low_disk_space_warning"),
3306 id::MAP => Some("map"),
3307 id::TRADE_LIST => Some("trade_list"),
3308 id::REL_ENTITY_MOVE => Some("rel_entity_move"),
3309 id::ENTITY_MOVE_LOOK => Some("entity_move_look"),
3310 id::MOVE_MINECART => Some("move_minecart"),
3311 id::ENTITY_LOOK => Some("entity_look"),
3312 id::VEHICLE_MOVE => Some("vehicle_move"),
3313 id::OPEN_BOOK => Some("open_book"),
3314 id::OPEN_WINDOW => Some("open_window"),
3315 id::OPEN_SIGN_ENTITY => Some("open_sign_entity"),
3316 id::PING => Some("ping"),
3317 id::PING_RESPONSE => Some("ping_response"),
3318 id::CRAFT_RECIPE_RESPONSE => Some("craft_recipe_response"),
3319 id::ABILITIES => Some("abilities"),
3320 id::PLAYER_CHAT => Some("player_chat"),
3321 id::END_COMBAT_EVENT => Some("end_combat_event"),
3322 id::ENTER_COMBAT_EVENT => Some("enter_combat_event"),
3323 id::DEATH_COMBAT_EVENT => Some("death_combat_event"),
3324 id::PLAYER_REMOVE => Some("player_remove"),
3325 id::PLAYER_INFO => Some("player_info"),
3326 id::FACE_PLAYER => Some("face_player"),
3327 id::POSITION => Some("position"),
3328 id::PLAYER_ROTATION => Some("player_rotation"),
3329 id::RECIPE_BOOK_ADD => Some("recipe_book_add"),
3330 id::RECIPE_BOOK_REMOVE => Some("recipe_book_remove"),
3331 id::RECIPE_BOOK_SETTINGS => Some("recipe_book_settings"),
3332 id::ENTITY_DESTROY => Some("entity_destroy"),
3333 id::REMOVE_ENTITY_EFFECT => Some("remove_entity_effect"),
3334 id::RESET_SCORE => Some("reset_score"),
3335 id::REMOVE_RESOURCE_PACK => Some("remove_resource_pack"),
3336 id::ADD_RESOURCE_PACK => Some("add_resource_pack"),
3337 id::RESPAWN => Some("respawn"),
3338 id::ENTITY_HEAD_ROTATION => Some("entity_head_rotation"),
3339 id::MULTI_BLOCK_CHANGE => Some("multi_block_change"),
3340 id::SELECT_ADVANCEMENT_TAB => Some("select_advancement_tab"),
3341 id::SERVER_DATA => Some("server_data"),
3342 id::ACTION_BAR => Some("action_bar"),
3343 id::WORLD_BORDER_CENTER => Some("world_border_center"),
3344 id::WORLD_BORDER_LERP_SIZE => Some("world_border_lerp_size"),
3345 id::WORLD_BORDER_SIZE => Some("world_border_size"),
3346 id::WORLD_BORDER_WARNING_DELAY => Some("world_border_warning_delay"),
3347 id::WORLD_BORDER_WARNING_REACH => Some("world_border_warning_reach"),
3348 id::CAMERA => Some("camera"),
3349 id::UPDATE_VIEW_POSITION => Some("update_view_position"),
3350 id::UPDATE_VIEW_DISTANCE => Some("update_view_distance"),
3351 id::SET_CURSOR_ITEM => Some("set_cursor_item"),
3352 id::SPAWN_POSITION => Some("spawn_position"),
3353 id::SCOREBOARD_DISPLAY_OBJECTIVE => Some("scoreboard_display_objective"),
3354 id::ENTITY_METADATA => Some("entity_metadata"),
3355 id::ATTACH_ENTITY => Some("attach_entity"),
3356 id::ENTITY_VELOCITY => Some("entity_velocity"),
3357 id::ENTITY_EQUIPMENT => Some("entity_equipment"),
3358 id::EXPERIENCE => Some("experience"),
3359 id::UPDATE_HEALTH => Some("update_health"),
3360 id::HELD_ITEM_SLOT => Some("held_item_slot"),
3361 id::SCOREBOARD_OBJECTIVE => Some("scoreboard_objective"),
3362 id::SET_PASSENGERS => Some("set_passengers"),
3363 id::SET_PLAYER_INVENTORY => Some("set_player_inventory"),
3364 id::TEAMS => Some("teams"),
3365 id::SCOREBOARD_SCORE => Some("scoreboard_score"),
3366 id::SIMULATION_DISTANCE => Some("simulation_distance"),
3367 id::SET_TITLE_SUBTITLE => Some("set_title_subtitle"),
3368 id::UPDATE_TIME => Some("update_time"),
3369 id::SET_TITLE_TEXT => Some("set_title_text"),
3370 id::SET_TITLE_TIME => Some("set_title_time"),
3371 id::ENTITY_SOUND_EFFECT => Some("entity_sound_effect"),
3372 id::SOUND_EFFECT => Some("sound_effect"),
3373 id::START_CONFIGURATION => Some("start_configuration"),
3374 id::STOP_SOUND => Some("stop_sound"),
3375 id::STORE_COOKIE => Some("store_cookie"),
3376 id::SYSTEM_CHAT => Some("system_chat"),
3377 id::PLAYERLIST_HEADER => Some("playerlist_header"),
3378 id::NBT_QUERY_RESPONSE => Some("nbt_query_response"),
3379 id::COLLECT => Some("collect"),
3380 id::ENTITY_TELEPORT => Some("entity_teleport"),
3381 id::TEST_INSTANCE_BLOCK_STATUS => Some("test_instance_block_status"),
3382 id::SET_TICKING_STATE => Some("set_ticking_state"),
3383 id::STEP_TICK => Some("step_tick"),
3384 id::TRANSFER => Some("transfer"),
3385 id::ADVANCEMENTS => Some("advancements"),
3386 id::ENTITY_UPDATE_ATTRIBUTES => Some("entity_update_attributes"),
3387 id::ENTITY_EFFECT => Some("entity_effect"),
3388 id::DECLARE_RECIPES => Some("declare_recipes"),
3389 id::TAGS => Some("tags"),
3390 id::SET_PROJECTILE_POWER => Some("set_projectile_power"),
3391 id::CUSTOM_REPORT_DETAILS => Some("custom_report_details"),
3392 id::SERVER_LINKS => Some("server_links"),
3393 id::TRACKED_WAYPOINT => Some("tracked_waypoint"),
3394 id::CLEAR_DIALOG => Some("clear_dialog"),
3395 id::SHOW_DIALOG => Some("show_dialog"),
3396 _ => None,
3397 }
3398 }
3399}
3400
3401impl ClientboundPlayPacket {
3402 pub const IDS: &'static [i32] = &[
3404 id::BUNDLE_DELIMITER,
3405 id::SPAWN_ENTITY,
3406 id::ANIMATION,
3407 id::STATISTICS,
3408 id::ACKNOWLEDGE_PLAYER_DIGGING,
3409 id::BLOCK_BREAK_ANIMATION,
3410 id::TILE_ENTITY_DATA,
3411 id::BLOCK_ACTION,
3412 id::BLOCK_CHANGE,
3413 id::BOSS_BAR,
3414 id::DIFFICULTY,
3415 id::CHUNK_BATCH_FINISHED,
3416 id::CHUNK_BATCH_START,
3417 id::CHUNK_BIOMES,
3418 id::CLEAR_TITLES,
3419 id::TAB_COMPLETE,
3420 id::DECLARE_COMMANDS,
3421 id::CLOSE_WINDOW,
3422 id::WINDOW_ITEMS,
3423 id::CRAFT_PROGRESS_BAR,
3424 id::SET_SLOT,
3425 id::COOKIE_REQUEST,
3426 id::SET_COOLDOWN,
3427 id::CHAT_SUGGESTIONS,
3428 id::CUSTOM_PAYLOAD,
3429 id::DAMAGE_EVENT,
3430 id::DEBUG_BLOCK_VALUE,
3431 id::DEBUG_CHUNK_VALUE,
3432 id::DEBUG_ENTITY_VALUE,
3433 id::DEBUG_EVENT,
3434 id::DEBUG_SAMPLE,
3435 id::HIDE_MESSAGE,
3436 id::KICK_DISCONNECT,
3437 id::PROFILELESS_CHAT,
3438 id::ENTITY_STATUS,
3439 id::SYNC_ENTITY_POSITION,
3440 id::EXPLOSION,
3441 id::UNLOAD_CHUNK,
3442 id::GAME_STATE_CHANGE,
3443 id::GAME_RULE_VALUES,
3444 id::GAME_TEST_HIGHLIGHT_POS,
3445 id::OPEN_HORSE_WINDOW,
3446 id::HURT_ANIMATION,
3447 id::INITIALIZE_WORLD_BORDER,
3448 id::KEEP_ALIVE,
3449 id::MAP_CHUNK,
3450 id::WORLD_EVENT,
3451 id::WORLD_PARTICLES,
3452 id::UPDATE_LIGHT,
3453 id::LOGIN,
3454 id::LOW_DISK_SPACE_WARNING,
3455 id::MAP,
3456 id::TRADE_LIST,
3457 id::REL_ENTITY_MOVE,
3458 id::ENTITY_MOVE_LOOK,
3459 id::MOVE_MINECART,
3460 id::ENTITY_LOOK,
3461 id::VEHICLE_MOVE,
3462 id::OPEN_BOOK,
3463 id::OPEN_WINDOW,
3464 id::OPEN_SIGN_ENTITY,
3465 id::PING,
3466 id::PING_RESPONSE,
3467 id::CRAFT_RECIPE_RESPONSE,
3468 id::ABILITIES,
3469 id::PLAYER_CHAT,
3470 id::END_COMBAT_EVENT,
3471 id::ENTER_COMBAT_EVENT,
3472 id::DEATH_COMBAT_EVENT,
3473 id::PLAYER_REMOVE,
3474 id::PLAYER_INFO,
3475 id::FACE_PLAYER,
3476 id::POSITION,
3477 id::PLAYER_ROTATION,
3478 id::RECIPE_BOOK_ADD,
3479 id::RECIPE_BOOK_REMOVE,
3480 id::RECIPE_BOOK_SETTINGS,
3481 id::ENTITY_DESTROY,
3482 id::REMOVE_ENTITY_EFFECT,
3483 id::RESET_SCORE,
3484 id::REMOVE_RESOURCE_PACK,
3485 id::ADD_RESOURCE_PACK,
3486 id::RESPAWN,
3487 id::ENTITY_HEAD_ROTATION,
3488 id::MULTI_BLOCK_CHANGE,
3489 id::SELECT_ADVANCEMENT_TAB,
3490 id::SERVER_DATA,
3491 id::ACTION_BAR,
3492 id::WORLD_BORDER_CENTER,
3493 id::WORLD_BORDER_LERP_SIZE,
3494 id::WORLD_BORDER_SIZE,
3495 id::WORLD_BORDER_WARNING_DELAY,
3496 id::WORLD_BORDER_WARNING_REACH,
3497 id::CAMERA,
3498 id::UPDATE_VIEW_POSITION,
3499 id::UPDATE_VIEW_DISTANCE,
3500 id::SET_CURSOR_ITEM,
3501 id::SPAWN_POSITION,
3502 id::SCOREBOARD_DISPLAY_OBJECTIVE,
3503 id::ENTITY_METADATA,
3504 id::ATTACH_ENTITY,
3505 id::ENTITY_VELOCITY,
3506 id::ENTITY_EQUIPMENT,
3507 id::EXPERIENCE,
3508 id::UPDATE_HEALTH,
3509 id::HELD_ITEM_SLOT,
3510 id::SCOREBOARD_OBJECTIVE,
3511 id::SET_PASSENGERS,
3512 id::SET_PLAYER_INVENTORY,
3513 id::TEAMS,
3514 id::SCOREBOARD_SCORE,
3515 id::SIMULATION_DISTANCE,
3516 id::SET_TITLE_SUBTITLE,
3517 id::UPDATE_TIME,
3518 id::SET_TITLE_TEXT,
3519 id::SET_TITLE_TIME,
3520 id::ENTITY_SOUND_EFFECT,
3521 id::SOUND_EFFECT,
3522 id::START_CONFIGURATION,
3523 id::STOP_SOUND,
3524 id::STORE_COOKIE,
3525 id::SYSTEM_CHAT,
3526 id::PLAYERLIST_HEADER,
3527 id::NBT_QUERY_RESPONSE,
3528 id::COLLECT,
3529 id::ENTITY_TELEPORT,
3530 id::TEST_INSTANCE_BLOCK_STATUS,
3531 id::SET_TICKING_STATE,
3532 id::STEP_TICK,
3533 id::TRANSFER,
3534 id::ADVANCEMENTS,
3535 id::ENTITY_UPDATE_ATTRIBUTES,
3536 id::ENTITY_EFFECT,
3537 id::DECLARE_RECIPES,
3538 id::TAGS,
3539 id::SET_PROJECTILE_POWER,
3540 id::CUSTOM_REPORT_DETAILS,
3541 id::SERVER_LINKS,
3542 id::TRACKED_WAYPOINT,
3543 id::CLEAR_DIALOG,
3544 id::SHOW_DIALOG,
3545 ];
3546 #[cfg(feature = "testgen")]
3548 pub fn generate_by_id(id: i32, g: &mut Gen) -> Option<Self> {
3549 match id {
3550 id::BUNDLE_DELIMITER => Some(Self::BundleDelimiter(
3551 <BundleDelimiter as Generate>::generate(g),
3552 )),
3553 id::SPAWN_ENTITY => Some(Self::SpawnEntity(<SpawnEntity as Generate>::generate(g))),
3554 id::ANIMATION => Some(Self::Animation(<Animation as Generate>::generate(g))),
3555 id::STATISTICS => Some(Self::Statistics(<Statistics as Generate>::generate(g))),
3556 id::ACKNOWLEDGE_PLAYER_DIGGING => Some(Self::AcknowledgePlayerDigging(
3557 <AcknowledgePlayerDigging as Generate>::generate(g),
3558 )),
3559 id::BLOCK_BREAK_ANIMATION => Some(Self::BlockBreakAnimation(
3560 <BlockBreakAnimation as Generate>::generate(g),
3561 )),
3562 id::TILE_ENTITY_DATA => Some(Self::TileEntityData(
3563 <TileEntityData as Generate>::generate(g),
3564 )),
3565 id::BLOCK_ACTION => Some(Self::BlockAction(<BlockAction as Generate>::generate(g))),
3566 id::BLOCK_CHANGE => Some(Self::BlockChange(<BlockChange as Generate>::generate(g))),
3567 id::BOSS_BAR => Some(Self::BossBar(<BossBar as Generate>::generate(g))),
3568 id::DIFFICULTY => Some(Self::Difficulty(<Difficulty as Generate>::generate(g))),
3569 id::CHUNK_BATCH_FINISHED => Some(Self::ChunkBatchFinished(
3570 <ChunkBatchFinished as Generate>::generate(g),
3571 )),
3572 id::CHUNK_BATCH_START => Some(Self::ChunkBatchStart(
3573 <ChunkBatchStart as Generate>::generate(g),
3574 )),
3575 id::CHUNK_BIOMES => Some(Self::ChunkBiomes(<ChunkBiomes as Generate>::generate(g))),
3576 id::CLEAR_TITLES => Some(Self::ClearTitles(<ClearTitles as Generate>::generate(g))),
3577 id::TAB_COMPLETE => Some(Self::TabComplete(<TabComplete as Generate>::generate(g))),
3578 id::DECLARE_COMMANDS => Some(Self::DeclareCommands(
3579 <DeclareCommands as Generate>::generate(g),
3580 )),
3581 id::CLOSE_WINDOW => Some(Self::CloseWindow(<CloseWindow as Generate>::generate(g))),
3582 id::WINDOW_ITEMS => Some(Self::WindowItems(<WindowItems as Generate>::generate(g))),
3583 id::CRAFT_PROGRESS_BAR => Some(Self::CraftProgressBar(
3584 <CraftProgressBar as Generate>::generate(g),
3585 )),
3586 id::SET_SLOT => Some(Self::SetSlot(<SetSlot as Generate>::generate(g))),
3587 id::COOKIE_REQUEST => Some(Self::CookieRequest(<CookieRequest as Generate>::generate(
3588 g,
3589 ))),
3590 id::SET_COOLDOWN => Some(Self::SetCooldown(<SetCooldown as Generate>::generate(g))),
3591 id::CHAT_SUGGESTIONS => Some(Self::ChatSuggestions(
3592 <ChatSuggestions as Generate>::generate(g),
3593 )),
3594 id::CUSTOM_PAYLOAD => Some(Self::CustomPayload(<CustomPayload as Generate>::generate(
3595 g,
3596 ))),
3597 id::DAMAGE_EVENT => Some(Self::DamageEvent(<DamageEvent as Generate>::generate(g))),
3598 id::DEBUG_BLOCK_VALUE => Some(Self::DebugBlockValue(
3599 <DebugBlockValue as Generate>::generate(g),
3600 )),
3601 id::DEBUG_CHUNK_VALUE => Some(Self::DebugChunkValue(
3602 <DebugChunkValue as Generate>::generate(g),
3603 )),
3604 id::DEBUG_ENTITY_VALUE => Some(Self::DebugEntityValue(
3605 <DebugEntityValue as Generate>::generate(g),
3606 )),
3607 id::DEBUG_EVENT => Some(Self::DebugEvent(<DebugEvent as Generate>::generate(g))),
3608 id::DEBUG_SAMPLE => Some(Self::DebugSample(<DebugSample as Generate>::generate(g))),
3609 id::HIDE_MESSAGE => Some(Self::HideMessage(<HideMessage as Generate>::generate(g))),
3610 id::KICK_DISCONNECT => Some(Self::KickDisconnect(
3611 <KickDisconnect as Generate>::generate(g),
3612 )),
3613 id::PROFILELESS_CHAT => Some(Self::ProfilelessChat(
3614 <ProfilelessChat as Generate>::generate(g),
3615 )),
3616 id::ENTITY_STATUS => Some(Self::EntityStatus(<EntityStatus as Generate>::generate(g))),
3617 id::SYNC_ENTITY_POSITION => Some(Self::SyncEntityPosition(
3618 <SyncEntityPosition as Generate>::generate(g),
3619 )),
3620 id::EXPLOSION => Some(Self::Explosion(<Explosion as Generate>::generate(g))),
3621 id::UNLOAD_CHUNK => Some(Self::UnloadChunk(<UnloadChunk as Generate>::generate(g))),
3622 id::GAME_STATE_CHANGE => Some(Self::GameStateChange(
3623 <GameStateChange as Generate>::generate(g),
3624 )),
3625 id::GAME_RULE_VALUES => Some(Self::GameRuleValues(
3626 <GameRuleValues as Generate>::generate(g),
3627 )),
3628 id::GAME_TEST_HIGHLIGHT_POS => Some(Self::GameTestHighlightPos(
3629 <GameTestHighlightPos as Generate>::generate(g),
3630 )),
3631 id::OPEN_HORSE_WINDOW => Some(Self::OpenHorseWindow(
3632 <OpenHorseWindow as Generate>::generate(g),
3633 )),
3634 id::HURT_ANIMATION => Some(Self::HurtAnimation(<HurtAnimation as Generate>::generate(
3635 g,
3636 ))),
3637 id::INITIALIZE_WORLD_BORDER => Some(Self::InitializeWorldBorder(
3638 <InitializeWorldBorder as Generate>::generate(g),
3639 )),
3640 id::KEEP_ALIVE => Some(Self::KeepAlive(<KeepAlive as Generate>::generate(g))),
3641 id::MAP_CHUNK => Some(Self::MapChunk(<MapChunk as Generate>::generate(g))),
3642 id::WORLD_EVENT => Some(Self::WorldEvent(<WorldEvent as Generate>::generate(g))),
3643 id::WORLD_PARTICLES => Some(Self::WorldParticles(
3644 <WorldParticles as Generate>::generate(g),
3645 )),
3646 id::UPDATE_LIGHT => Some(Self::UpdateLight(<UpdateLight as Generate>::generate(g))),
3647 id::LOGIN => Some(Self::Login(<Login as Generate>::generate(g))),
3648 id::LOW_DISK_SPACE_WARNING => Some(Self::LowDiskSpaceWarning(
3649 <LowDiskSpaceWarning as Generate>::generate(g),
3650 )),
3651 id::MAP => Some(Self::Map(<Map as Generate>::generate(g))),
3652 id::TRADE_LIST => Some(Self::TradeList(<TradeList as Generate>::generate(g))),
3653 id::REL_ENTITY_MOVE => Some(Self::RelEntityMove(
3654 <RelEntityMove as Generate>::generate(g),
3655 )),
3656 id::ENTITY_MOVE_LOOK => Some(Self::EntityMoveLook(
3657 <EntityMoveLook as Generate>::generate(g),
3658 )),
3659 id::MOVE_MINECART => Some(Self::MoveMinecart(<MoveMinecart as Generate>::generate(g))),
3660 id::ENTITY_LOOK => Some(Self::EntityLook(<EntityLook as Generate>::generate(g))),
3661 id::VEHICLE_MOVE => Some(Self::VehicleMove(<VehicleMove as Generate>::generate(g))),
3662 id::OPEN_BOOK => Some(Self::OpenBook(<OpenBook as Generate>::generate(g))),
3663 id::OPEN_WINDOW => Some(Self::OpenWindow(<OpenWindow as Generate>::generate(g))),
3664 id::OPEN_SIGN_ENTITY => Some(Self::OpenSignEntity(
3665 <OpenSignEntity as Generate>::generate(g),
3666 )),
3667 id::PING => Some(Self::Ping(<Ping as Generate>::generate(g))),
3668 id::PING_RESPONSE => Some(Self::PingResponse(<PingResponse as Generate>::generate(g))),
3669 id::CRAFT_RECIPE_RESPONSE => Some(Self::CraftRecipeResponse(
3670 <CraftRecipeResponse as Generate>::generate(g),
3671 )),
3672 id::ABILITIES => Some(Self::Abilities(<Abilities as Generate>::generate(g))),
3673 id::PLAYER_CHAT => Some(Self::PlayerChat(<PlayerChat as Generate>::generate(g))),
3674 id::END_COMBAT_EVENT => Some(Self::EndCombatEvent(
3675 <EndCombatEvent as Generate>::generate(g),
3676 )),
3677 id::ENTER_COMBAT_EVENT => Some(Self::EnterCombatEvent(
3678 <EnterCombatEvent as Generate>::generate(g),
3679 )),
3680 id::DEATH_COMBAT_EVENT => Some(Self::DeathCombatEvent(
3681 <DeathCombatEvent as Generate>::generate(g),
3682 )),
3683 id::PLAYER_REMOVE => Some(Self::PlayerRemove(<PlayerRemove as Generate>::generate(g))),
3684 id::PLAYER_INFO => Some(Self::PlayerInfo(<PlayerInfo as Generate>::generate(g))),
3685 id::FACE_PLAYER => Some(Self::FacePlayer(<FacePlayer as Generate>::generate(g))),
3686 id::POSITION => Some(Self::Position(<Position as Generate>::generate(g))),
3687 id::PLAYER_ROTATION => Some(Self::PlayerRotation(
3688 <PlayerRotation as Generate>::generate(g),
3689 )),
3690 id::RECIPE_BOOK_ADD => Some(Self::RecipeBookAdd(
3691 <RecipeBookAdd as Generate>::generate(g),
3692 )),
3693 id::RECIPE_BOOK_REMOVE => Some(Self::RecipeBookRemove(
3694 <RecipeBookRemove as Generate>::generate(g),
3695 )),
3696 id::RECIPE_BOOK_SETTINGS => Some(Self::RecipeBookSettings(
3697 <RecipeBookSettings as Generate>::generate(g),
3698 )),
3699 id::ENTITY_DESTROY => Some(Self::EntityDestroy(<EntityDestroy as Generate>::generate(
3700 g,
3701 ))),
3702 id::REMOVE_ENTITY_EFFECT => Some(Self::RemoveEntityEffect(
3703 <RemoveEntityEffect as Generate>::generate(g),
3704 )),
3705 id::RESET_SCORE => Some(Self::ResetScore(<ResetScore as Generate>::generate(g))),
3706 id::REMOVE_RESOURCE_PACK => Some(Self::RemoveResourcePack(
3707 <RemoveResourcePack as Generate>::generate(g),
3708 )),
3709 id::ADD_RESOURCE_PACK => Some(Self::AddResourcePack(
3710 <AddResourcePack as Generate>::generate(g),
3711 )),
3712 id::RESPAWN => Some(Self::Respawn(<Respawn as Generate>::generate(g))),
3713 id::ENTITY_HEAD_ROTATION => Some(Self::EntityHeadRotation(
3714 <EntityHeadRotation as Generate>::generate(g),
3715 )),
3716 id::MULTI_BLOCK_CHANGE => Some(Self::MultiBlockChange(
3717 <MultiBlockChange as Generate>::generate(g),
3718 )),
3719 id::SELECT_ADVANCEMENT_TAB => Some(Self::SelectAdvancementTab(
3720 <SelectAdvancementTab as Generate>::generate(g),
3721 )),
3722 id::SERVER_DATA => Some(Self::ServerData(<ServerData as Generate>::generate(g))),
3723 id::ACTION_BAR => Some(Self::ActionBar(<ActionBar as Generate>::generate(g))),
3724 id::WORLD_BORDER_CENTER => Some(Self::WorldBorderCenter(
3725 <WorldBorderCenter as Generate>::generate(g),
3726 )),
3727 id::WORLD_BORDER_LERP_SIZE => Some(Self::WorldBorderLerpSize(
3728 <WorldBorderLerpSize as Generate>::generate(g),
3729 )),
3730 id::WORLD_BORDER_SIZE => Some(Self::WorldBorderSize(
3731 <WorldBorderSize as Generate>::generate(g),
3732 )),
3733 id::WORLD_BORDER_WARNING_DELAY => Some(Self::WorldBorderWarningDelay(
3734 <WorldBorderWarningDelay as Generate>::generate(g),
3735 )),
3736 id::WORLD_BORDER_WARNING_REACH => Some(Self::WorldBorderWarningReach(
3737 <WorldBorderWarningReach as Generate>::generate(g),
3738 )),
3739 id::CAMERA => Some(Self::Camera(<Camera as Generate>::generate(g))),
3740 id::UPDATE_VIEW_POSITION => Some(Self::UpdateViewPosition(
3741 <UpdateViewPosition as Generate>::generate(g),
3742 )),
3743 id::UPDATE_VIEW_DISTANCE => Some(Self::UpdateViewDistance(
3744 <UpdateViewDistance as Generate>::generate(g),
3745 )),
3746 id::SET_CURSOR_ITEM => Some(Self::SetCursorItem(
3747 <SetCursorItem as Generate>::generate(g),
3748 )),
3749 id::SPAWN_POSITION => Some(Self::SpawnPosition(<SpawnPosition as Generate>::generate(
3750 g,
3751 ))),
3752 id::SCOREBOARD_DISPLAY_OBJECTIVE => Some(Self::ScoreboardDisplayObjective(
3753 <ScoreboardDisplayObjective as Generate>::generate(g),
3754 )),
3755 id::ENTITY_METADATA => Some(Self::EntityMetadata(
3756 <EntityMetadata as Generate>::generate(g),
3757 )),
3758 id::ATTACH_ENTITY => Some(Self::AttachEntity(<AttachEntity as Generate>::generate(g))),
3759 id::ENTITY_VELOCITY => Some(Self::EntityVelocity(
3760 <EntityVelocity as Generate>::generate(g),
3761 )),
3762 id::ENTITY_EQUIPMENT => Some(Self::EntityEquipment(
3763 <EntityEquipment as Generate>::generate(g),
3764 )),
3765 id::EXPERIENCE => Some(Self::Experience(<Experience as Generate>::generate(g))),
3766 id::UPDATE_HEALTH => Some(Self::UpdateHealth(<UpdateHealth as Generate>::generate(g))),
3767 id::HELD_ITEM_SLOT => Some(Self::HeldItemSlot(<HeldItemSlot as Generate>::generate(g))),
3768 id::SCOREBOARD_OBJECTIVE => Some(Self::ScoreboardObjective(
3769 <ScoreboardObjective as Generate>::generate(g),
3770 )),
3771 id::SET_PASSENGERS => Some(Self::SetPassengers(<SetPassengers as Generate>::generate(
3772 g,
3773 ))),
3774 id::SET_PLAYER_INVENTORY => Some(Self::SetPlayerInventory(
3775 <SetPlayerInventory as Generate>::generate(g),
3776 )),
3777 id::TEAMS => Some(Self::Teams(<Teams as Generate>::generate(g))),
3778 id::SCOREBOARD_SCORE => Some(Self::ScoreboardScore(
3779 <ScoreboardScore as Generate>::generate(g),
3780 )),
3781 id::SIMULATION_DISTANCE => Some(Self::SimulationDistance(
3782 <SimulationDistance as Generate>::generate(g),
3783 )),
3784 id::SET_TITLE_SUBTITLE => Some(Self::SetTitleSubtitle(
3785 <SetTitleSubtitle as Generate>::generate(g),
3786 )),
3787 id::UPDATE_TIME => Some(Self::UpdateTime(<UpdateTime as Generate>::generate(g))),
3788 id::SET_TITLE_TEXT => Some(Self::SetTitleText(<SetTitleText as Generate>::generate(g))),
3789 id::SET_TITLE_TIME => Some(Self::SetTitleTime(<SetTitleTime as Generate>::generate(g))),
3790 id::ENTITY_SOUND_EFFECT => Some(Self::EntitySoundEffect(
3791 <EntitySoundEffect as Generate>::generate(g),
3792 )),
3793 id::SOUND_EFFECT => Some(Self::SoundEffect(<SoundEffect as Generate>::generate(g))),
3794 id::START_CONFIGURATION => Some(Self::StartConfiguration(
3795 <StartConfiguration as Generate>::generate(g),
3796 )),
3797 id::STOP_SOUND => Some(Self::StopSound(<StopSound as Generate>::generate(g))),
3798 id::STORE_COOKIE => Some(Self::StoreCookie(<StoreCookie as Generate>::generate(g))),
3799 id::SYSTEM_CHAT => Some(Self::SystemChat(<SystemChat as Generate>::generate(g))),
3800 id::PLAYERLIST_HEADER => Some(Self::PlayerlistHeader(
3801 <PlayerlistHeader as Generate>::generate(g),
3802 )),
3803 id::NBT_QUERY_RESPONSE => Some(Self::NbtQueryResponse(
3804 <NbtQueryResponse as Generate>::generate(g),
3805 )),
3806 id::COLLECT => Some(Self::Collect(<Collect as Generate>::generate(g))),
3807 id::ENTITY_TELEPORT => Some(Self::EntityTeleport(
3808 <EntityTeleport as Generate>::generate(g),
3809 )),
3810 id::TEST_INSTANCE_BLOCK_STATUS => Some(Self::TestInstanceBlockStatus(
3811 <TestInstanceBlockStatus as Generate>::generate(g),
3812 )),
3813 id::SET_TICKING_STATE => Some(Self::SetTickingState(
3814 <SetTickingState as Generate>::generate(g),
3815 )),
3816 id::STEP_TICK => Some(Self::StepTick(<StepTick as Generate>::generate(g))),
3817 id::TRANSFER => Some(Self::Transfer(<Transfer as Generate>::generate(g))),
3818 id::ADVANCEMENTS => Some(Self::Advancements(<Advancements as Generate>::generate(g))),
3819 id::ENTITY_UPDATE_ATTRIBUTES => Some(Self::EntityUpdateAttributes(
3820 <EntityUpdateAttributes as Generate>::generate(g),
3821 )),
3822 id::ENTITY_EFFECT => Some(Self::EntityEffect(<EntityEffect as Generate>::generate(g))),
3823 id::DECLARE_RECIPES => Some(Self::DeclareRecipes(
3824 <DeclareRecipes as Generate>::generate(g),
3825 )),
3826 id::TAGS => Some(Self::Tags(<Tags as Generate>::generate(g))),
3827 id::SET_PROJECTILE_POWER => Some(Self::SetProjectilePower(
3828 <SetProjectilePower as Generate>::generate(g),
3829 )),
3830 id::CUSTOM_REPORT_DETAILS => Some(Self::CustomReportDetails(
3831 <CustomReportDetails as Generate>::generate(g),
3832 )),
3833 id::SERVER_LINKS => Some(Self::ServerLinks(<ServerLinks as Generate>::generate(g))),
3834 id::TRACKED_WAYPOINT => Some(Self::TrackedWaypoint(
3835 <TrackedWaypoint as Generate>::generate(g),
3836 )),
3837 id::CLEAR_DIALOG => Some(Self::ClearDialog(<ClearDialog as Generate>::generate(g))),
3838 id::SHOW_DIALOG => Some(Self::ShowDialog(<ShowDialog as Generate>::generate(g))),
3839 _ => None,
3840 }
3841 }
3842}