Documentation ¶
Index ¶
Constants ¶
const (
CurrentBlockVersion = (1 << 24) | (20 << 16) | (80 << 8) | 3 // 18108419
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CraftingRecipes ¶
type CraftingRecipes struct { Shaped []ShapedRecipe `nbt:"shaped"` Shapeless []ShapelessRecipe `nbt:"shapeless"` }
CraftingRecipes represents the structure for crafting_data.nbt that dragonfly uses.
type CreativeItem ¶
type CreativeItem struct { Name string `nbt:"name"` Meta int16 `nbt:"meta,omitempty"` NBT map[string]any `nbt:"nbt,omitempty"` BlockProperties map[string]any `nbt:"block_properties,omitempty"` }
CreativeItem represents the structure of a creative item that dragonfly reads from creative_items.nbt.
type RecipeInputItem ¶
type RecipeInputItem struct { Name string `nbt:"name,omitempty"` Meta int32 `nbt:"meta,omitempty"` Count int32 `nbt:"count"` State map[string]any `nbt:"block,omitempty"` Tag string `nbt:"tag,omitempty"` }
RecipeInputItem represents the structure of an input item in a recipe.
type RecipeOutputItem ¶
type RecipeOutputItem struct { Name string `nbt:"name"` Meta int32 `nbt:"meta,omitempty"` Count int16 `nbt:"count"` State map[string]any `nbt:"block,omitempty"` NBTData map[string]any `nbt:"data,omitempty"` }
RecipeOutputItem represents the structure of an output item in a recipe.
type ShapedRecipe ¶
type ShapedRecipe struct { Input []RecipeInputItem `nbt:"input,omitempty"` Output []RecipeOutputItem `nbt:"output,omitempty"` Block string `nbt:"block,omitempty"` Width int32 `nbt:"width,omitempty"` Height int32 `nbt:"height,omitempty"` Priority int32 `nbt:"priority,omitempty"` }
ShapedRecipe represents the structure of a shaped recipe in dragonfly, used in crafting_data.nbt.
func NewShapedRecipe ¶
func NewShapedRecipe(recipe protocol.ShapedRecipe) ShapedRecipe
NewShapedRecipe creates a new ShapedRecipe from a protocol.ShapedRecipe. It converts the input and output items to the RecipeInputItem and RecipeOutputItem structures.
type ShapelessRecipe ¶
type ShapelessRecipe struct { Input []RecipeInputItem `nbt:"input,omitempty"` Output []RecipeOutputItem `nbt:"output,omitempty"` Block string `nbt:"block,omitempty"` Priority int32 `nbt:"priority,omitempty"` }
ShapelessRecipe represents the structure of a shapeless recipe in dragonfly, used in crafting_data.nbt but also in smithing_data.nbt and smithing_trim_data.nbt.
func NewShapelessRecipe ¶
func NewShapelessRecipe(recipe protocol.ShapelessRecipe) ShapelessRecipe
NewShapelessRecipe creates a new ShapelessRecipe from a protocol.ShapelessRecipe. It converts the input and output items to the RecipeInputItem and RecipeOutputItem structures.