forked from df-mc/dragonfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netherrack.go
38 lines (31 loc) · 892 Bytes
/
netherrack.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
package block
import (
"github.com/Adrian8115/dragonfly-Amethyst-Protocol/server/item"
"github.com/Adrian8115/dragonfly-Amethyst-Protocol/server/world"
)
// Netherrack is a block found in The Nether.
type Netherrack struct {
solid
bassDrum
}
// SoilFor ...
func (n Netherrack) SoilFor(block world.Block) bool {
flower, ok := block.(Flower)
return ok && flower.Type == WitherRose()
}
// BreakInfo ...
func (n Netherrack) BreakInfo() BreakInfo {
return newBreakInfo(0.4, pickaxeHarvestable, pickaxeEffective, oneOf(n))
}
// SmeltInfo ...
func (Netherrack) SmeltInfo() item.SmeltInfo {
return newSmeltInfo(item.NewStack(item.NetherBrick{}, 1), 0.1)
}
// EncodeItem ...
func (Netherrack) EncodeItem() (name string, meta int16) {
return "minecraft:netherrack", 0
}
// EncodeBlock ...
func (Netherrack) EncodeBlock() (string, map[string]any) {
return "minecraft:netherrack", nil
}