Files
Pumpkin/crates/pumpkin-protocol/src/bedrock/client/gamerules_changed.rs
Demetrius Kanios 24ae9faa4f chore(bedrock): Update most of the packets to mirror the official docs (#3044)
* 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>
2026-08-25 09:06:23 -07:00

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)
}
}