pub enum Recipe {
Shaped {
width: u8,
height: u8,
inputs: &'static [Option<(u16, u16)>],
output: (u16, u8, u16),
},
Shapeless {
inputs: &'static [(u16, u16)],
output: (u16, u8, u16),
},
Special(SpecialRecipe),
}Expand description
A 1.8.9 crafting recipe (from the oracle’s dump of RecipeDispatcher.getAllRecipes()).
Ingredients are (item id, data); data 32767 matches any damage value (vanilla’s wildcard,
used for block ingredients). Outputs are (item id, count, damage); no output carries NBT.
Variants§
Shaped
Shaped recipe: inputs is row-major, width * height slots, None = must be empty.
Fields
Shapeless
Shapeless recipe: every input must be matched by exactly one grid item.
Fields
Special(SpecialRecipe)
A recipe implemented in code.
Trait Implementations§
impl Copy for Recipe
impl Eq for Recipe
impl StructuralPartialEq for Recipe
Auto Trait Implementations§
impl Forget for Recipe
impl Freeze for Recipe
impl RefUnwindSafe for Recipe
impl Send for Recipe
impl Sync for Recipe
impl Unpin for Recipe
impl UnsafeUnpin for Recipe
impl UnwindSafe for Recipe
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