mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
28 lines
687 B
Rust
28 lines
687 B
Rust
use azalea_buf::AzBuf;
|
|
use azalea_protocol_macros::ClientboundGamePacket;
|
|
|
|
use crate::common::recipe::{Ingredient, RecipeDisplayData};
|
|
|
|
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
|
|
pub struct ClientboundRecipeBookAdd {
|
|
pub entries: Vec<Entry>,
|
|
pub replace: bool,
|
|
}
|
|
|
|
#[derive(Clone, Debug, AzBuf)]
|
|
pub struct Entry {
|
|
pub contents: RecipeDisplayEntry,
|
|
pub flags: u8,
|
|
}
|
|
|
|
#[derive(Clone, Debug, AzBuf)]
|
|
pub struct RecipeDisplayEntry {
|
|
#[var]
|
|
pub id: u32,
|
|
pub display: RecipeDisplayData,
|
|
// optional varint
|
|
#[var]
|
|
pub group: u32,
|
|
pub category: azalea_registry::RecipeBookCategory,
|
|
pub crafting_requirements: Option<Vec<Ingredient>>,
|
|
}
|