Files
minego/pkg/protocol/component/enchantments.go
2025-08-22 05:14:59 +08:00

25 lines
381 B
Go

package component
import (
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
)
//codec:gen
type Enchantments struct {
Enchantments []Enchantment
}
//codec:gen
type Enchantment struct {
Type int32 `mc:"VarInt"`
Level int32 `mc:"VarInt"`
}
func (*Enchantments) Type() slot.ComponentID {
return 10
}
func (*Enchantments) ID() string {
return "minecraft:enchantments"
}