refactor package
This commit is contained in:
24
pkg/protocol/component/enchantments.go
Normal file
24
pkg/protocol/component/enchantments.go
Normal file
@ -0,0 +1,24 @@
|
||||
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"
|
||||
}
|
Reference in New Issue
Block a user