refactor package

This commit is contained in:
2025-08-22 05:14:59 +08:00
parent bec0a56a3d
commit 65690e51ab
371 changed files with 835 additions and 627 deletions

View File

@ -0,0 +1,42 @@
package component
import (
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
)
//codec:gen
type PotionContents struct {
HasPotionID bool
PotionID int32 `mc:"VarInt"`
HasCustomColor bool
CustomColor int32 `mc:"Int"`
CustomEffects []PotionEffect
CustomName string
}
//codec:gen
type PotionEffect struct {
TypeID int32 `mc:"VarInt"`
Details PotionEffectDetails
}
//codec:gen
type PotionEffectDetails struct {
Amplifier int32 `mc:"VarInt"`
Duration int32 `mc:"VarInt"`
Ambient bool
ShowParticles bool
ShowIcon bool
HasHiddenEffect bool
//opt:optional:HasHiddenEffect
HiddenEffect *PotionEffect
}
func (*PotionContents) Type() slot.ComponentID {
return 42
}
func (*PotionContents) ID() string {
return "minecraft:potion_contents"
}