refactor package
This commit is contained in:
20
pkg/protocol/component/food.go
Normal file
20
pkg/protocol/component/food.go
Normal file
@ -0,0 +1,20 @@
|
||||
package component
|
||||
|
||||
import (
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||
)
|
||||
|
||||
//codec:gen
|
||||
type Food struct {
|
||||
Nutrition int32 `mc:"VarInt"`
|
||||
SaturationModifier float32
|
||||
CanAlwaysEat bool
|
||||
}
|
||||
|
||||
func (*Food) Type() slot.ComponentID {
|
||||
return 20
|
||||
}
|
||||
|
||||
func (*Food) ID() string {
|
||||
return "minecraft:food"
|
||||
}
|
Reference in New Issue
Block a user