forked from df-mc/dragonfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aqua_affinity.go
40 lines (32 loc) · 858 Bytes
/
aqua_affinity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package enchantment
import (
"github.com/Adrian8115/dragonfly-Amethyst-Protocol/server/item"
"github.com/Adrian8115/dragonfly-Amethyst-Protocol/server/world"
)
// AquaAffinity is a helmet enchantment that increases underwater mining speed.
type AquaAffinity struct{}
// Name ...
func (AquaAffinity) Name() string {
return "Aqua Affinity"
}
// MaxLevel ...
func (AquaAffinity) MaxLevel() int {
return 1
}
// Cost ...
func (AquaAffinity) Cost(int) (int, int) {
return 1, 41
}
// Rarity ...
func (AquaAffinity) Rarity() item.EnchantmentRarity {
return item.EnchantmentRarityRare
}
// CompatibleWithEnchantment ...
func (AquaAffinity) CompatibleWithEnchantment(item.EnchantmentType) bool {
return true
}
// CompatibleWithItem ...
func (AquaAffinity) CompatibleWithItem(i world.Item) bool {
h, ok := i.(item.HelmetType)
return ok && h.Helmet()
}