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,37 @@
|
||||
package block
|
||||
|
||||
import (
|
||||
"github.com/df-mc/dragonfly/server/world"
|
||||
)
|
||||
|
||||
// Prismarine is a type of stone that appears underwater in ruins and ocean monuments.
|
||||
type Prismarine struct {
|
||||
solid
|
||||
bassDrum
|
||||
|
||||
// Type is the type of prismarine of the block.
|
||||
Type PrismarineType
|
||||
}
|
||||
|
||||
// BreakInfo ...
|
||||
func (p Prismarine) BreakInfo() BreakInfo {
|
||||
return newBreakInfo(1.5, pickaxeHarvestable, pickaxeEffective, oneOf(p)).withBlastResistance(30)
|
||||
}
|
||||
|
||||
// EncodeItem ...
|
||||
func (p Prismarine) EncodeItem() (id string, meta int16) {
|
||||
return "minecraft:" + p.Type.String(), 0
|
||||
}
|
||||
|
||||
// EncodeBlock ...
|
||||
func (p Prismarine) EncodeBlock() (name string, properties map[string]any) {
|
||||
return "minecraft:" + p.Type.String(), nil
|
||||
}
|
||||
|
||||
// allPrismarine returns a list of all prismarine block variants.
|
||||
func allPrismarine() (c []world.Block) {
|
||||
for _, t := range PrismarineTypes() {
|
||||
c = append(c, Prismarine{Type: t})
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user