minecraft_command_types/command/
recipe.rs1use crate::resource_location::ResourceLocation;
2use minecraft_command_types_derive::HasMacro;
3use std::fmt::{Display, Formatter};
4
5#[derive(Debug, Clone, Eq, PartialEq, Hash, HasMacro)]
6pub enum RecipeType {
7 All,
8 Recipe(ResourceLocation),
9}
10
11impl Display for RecipeType {
12 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
13 match self {
14 RecipeType::All => f.write_str("*"),
15 RecipeType::Recipe(recipe) => recipe.fmt(f),
16 }
17 }
18}