pub struct Book {Show 15 fields
pub id: String,
pub name: String,
pub nameplate_color: String,
pub landing_text: String,
pub author: Option<String>,
pub book_texture: String,
pub filler_texture: String,
pub model: String,
pub categories: Vec<BookCategory>,
pub entries: Vec<BookEntry>,
pub macros: Vec<BookMacro>,
pub use_resource_pack: bool,
pub show_progress: bool,
pub i18n: bool,
pub creative_tab: Option<String>,
}Expand description
The top-level book definition — replaces patchouli_books/<id>/book.json.
Fields§
§id: String§name: String§nameplate_color: String§landing_text: String§book_texture: String§filler_texture: String§model: String§categories: Vec<BookCategory>§entries: Vec<BookEntry>§macros: Vec<BookMacro>§use_resource_pack: bool§show_progress: bool§i18n: bool§creative_tab: Option<String>Implementations§
Source§impl Book
impl Book
pub fn new(id: impl Into<String>, name: impl Into<String>) -> Book
pub fn book_texture(self, tex: impl Into<String>) -> Book
pub fn filler_texture(self, tex: impl Into<String>) -> Book
pub fn nameplate(self, color: impl Into<String>) -> Book
pub fn landing_text(self, text: impl Into<String>) -> Book
pub fn model(self, model: impl Into<String>) -> Book
pub fn creative_tab(self, tab: impl Into<String>) -> Book
pub fn show_progress(self, show: bool) -> Book
pub fn i18n(self, val: bool) -> Book
pub fn use_resource_pack(self, val: bool) -> Book
pub fn add_macro(self, key: impl Into<String>, value: impl Into<String>) -> Book
pub fn add_category(self, category: BookCategory) -> Book
pub fn add_entry(self, entry: BookEntry) -> Book
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Book
impl RefUnwindSafe for Book
impl Send for Book
impl Sync for Book
impl Unpin for Book
impl UnsafeUnpin for Book
impl UnwindSafe for Book
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more