valence_protocol/packets/play/
open_screen_s2c.rs

1use std::borrow::Cow;
2
3use valence_text::Text;
4
5use crate::{Decode, Encode, Packet, VarInt};
6
7#[derive(Clone, Debug, Encode, Decode, Packet)]
8pub struct OpenScreenS2c<'a> {
9    pub window_id: VarInt,
10    pub window_type: WindowType,
11    pub window_title: Cow<'a, Text>,
12}
13
14#[derive(Copy, Clone, PartialEq, Eq, Debug, Encode, Decode)]
15pub enum WindowType {
16    Generic9x1,
17    Generic9x2,
18    Generic9x3,
19    Generic9x4,
20    Generic9x5,
21    Generic9x6,
22    Generic3x3,
23    Anvil,
24    Beacon,
25    BlastFurnace,
26    BrewingStand,
27    Crafting,
28    Enchantment,
29    Furnace,
30    Grindstone,
31    Hopper,
32    Lectern,
33    Loom,
34    Merchant,
35    ShulkerBox,
36    Smithing,
37    Smoker,
38    Cartography,
39    Stonecutter,
40}