up3
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package block
|
||||
|
||||
import "github.com/df-mc/dragonfly/server/item"
|
||||
|
||||
// CoalOre is a common ore.
|
||||
type CoalOre struct {
|
||||
solid
|
||||
bassDrum
|
||||
|
||||
// Type is the type of coal ore.
|
||||
Type OreType
|
||||
}
|
||||
|
||||
// BreakInfo ...
|
||||
func (c CoalOre) BreakInfo() BreakInfo {
|
||||
return newBreakInfo(c.Type.Hardness(), pickaxeHarvestable, pickaxeEffective, oreDrops(item.Coal{}, c)).withXPDropRange(0, 2).withBlastResistance(15)
|
||||
}
|
||||
|
||||
// SmeltInfo ...
|
||||
func (CoalOre) SmeltInfo() item.SmeltInfo {
|
||||
return newOreSmeltInfo(item.NewStack(item.Coal{}, 1), 0.1)
|
||||
}
|
||||
|
||||
// EncodeItem ...
|
||||
func (c CoalOre) EncodeItem() (name string, meta int16) {
|
||||
return "minecraft:" + c.Type.Prefix() + "coal_ore", 0
|
||||
}
|
||||
|
||||
// EncodeBlock ...
|
||||
func (c CoalOre) EncodeBlock() (string, map[string]any) {
|
||||
return "minecraft:" + c.Type.Prefix() + "coal_ore", nil
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user