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,48 @@
package component
import (
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
pk "github.com/Tnze/go-mc/net/packet"
)
//codec:gen
type BlocksAttacks struct {
BlockDelaySeconds float32
DisableCooldownScale float32
DamageReductions []DamageReduction
ItemDamageThreshold float32
ItemDamageBase float32
ItemDamageFactor float32
BypassedBy pk.Option[pk.Identifier, *pk.Identifier]
HasBlockSound bool
//opt:optional:HasBlockSound
BlockSoundID int32 `mc:"VarInt"`
//opt:optional:HasBlockSound
//opt:id:BlockSoundID
BlockSound SoundEvent
HasDisableSound bool
//opt:optional:HasDisableSound
DisableSoundID int32 `mc:"VarInt"`
//opt:optional:HasDisableSound
//opt:id:DisableSoundID
DisableSound SoundEvent
}
//codec:gen
type DamageReduction struct {
HorizontalBlockingAngle float32
HasType bool
//opt:optional:HasType
Type pk.IDSet
Base float32
Factor float32
}
func (*BlocksAttacks) Type() slot.ComponentID {
return 33
}
func (*BlocksAttacks) ID() string {
return "minecraft:blocks_attacks"
}