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

49 lines
1.1 KiB
Go

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"
}