mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
* chore(bedrock): Update most of the packets to mirror the official docs more closely. * Fix typo * Fix CCreativeContent * Undo unrelated `registry.rs` change * Update WIT to merged PR --------- Signed-off-by: Demetrius Kanios <demetrius@kanios.net>
28 lines
570 B
Rust
28 lines
570 B
Rust
use pumpkin_macros::packet;
|
|
|
|
use crate::{codec::var_uint::VarUInt, serial::PacketWrite};
|
|
|
|
#[derive(PacketWrite)]
|
|
#[packet(72)]
|
|
pub struct CGamerulesChanged {
|
|
pub rule_data: Vec<GameRule>,
|
|
}
|
|
|
|
#[derive(PacketWrite)]
|
|
pub struct GameRule {
|
|
pub rule_name: String,
|
|
pub rule_can_be_modified: bool,
|
|
pub rule_value: RuleValue,
|
|
}
|
|
|
|
// TODO: flesh out RuleValue
|
|
pub enum RuleValue {
|
|
Null,
|
|
}
|
|
|
|
impl PacketWrite for RuleValue {
|
|
fn write<W: std::io::prelude::Write>(&self, writer: &mut W) -> Result<(), std::io::Error> {
|
|
VarUInt(0).write(writer)
|
|
}
|
|
}
|