Files
mc/server/block/nether_wart_block.go
TarnaWijaya 26ed99fda6
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
up3
2026-07-09 08:33:57 +08:00

36 lines
901 B
Go

package block
// NetherWartBlock is a decorative block found in crimson forests and crafted using Nether wart.
type NetherWartBlock struct {
solid
// Warped is the turquoise variant found in warped forests, but cannot be crafted unlike Nether wart block.
Warped bool
}
// BreakInfo ...
func (n NetherWartBlock) BreakInfo() BreakInfo {
return newBreakInfo(1, alwaysHarvestable, hoeEffective, oneOf(n))
}
// CompostChance ...
func (NetherWartBlock) CompostChance() float64 {
return 0.85
}
// EncodeItem ...
func (n NetherWartBlock) EncodeItem() (name string, meta int16) {
if n.Warped {
return "minecraft:warped_wart_block", 0
}
return "minecraft:nether_wart_block", 0
}
// EncodeBlock ...
func (n NetherWartBlock) EncodeBlock() (name string, properties map[string]interface{}) {
if n.Warped {
return "minecraft:warped_wart_block", nil
}
return "minecraft:nether_wart_block", nil
}