forked from df-mc/dragonfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nether_gold_ore.go
31 lines (25 loc) · 834 Bytes
/
nether_gold_ore.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
package block
import (
"github.com/Adrian8115/dragonfly-Amethyst-Protocol/server/item"
"math/rand"
)
// NetherGoldOre is a variant of gold ore found exclusively in The Nether.
type NetherGoldOre struct {
solid
}
// BreakInfo ...
func (n NetherGoldOre) BreakInfo() BreakInfo {
return newBreakInfo(3, pickaxeHarvestable, pickaxeEffective, silkTouchDrop(item.NewStack(item.GoldNugget{}, rand.Intn(4)+2), item.NewStack(n, 1))).withXPDropRange(0, 1)
}
// SmeltInfo ...
func (NetherGoldOre) SmeltInfo() item.SmeltInfo {
return newOreSmeltInfo(item.NewStack(item.GoldIngot{}, 1), 1)
}
// EncodeItem ...
func (NetherGoldOre) EncodeItem() (name string, meta int16) {
return "minecraft:nether_gold_ore", 0
}
// EncodeBlock ...
func (NetherGoldOre) EncodeBlock() (string, map[string]any) {
return "minecraft:nether_gold_ore", nil
}