Files
mc/server/block/resin_bricks.go
T
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

32 lines
734 B
Go

package block
// ResinBricks is a block crafted from resin brick.
type ResinBricks struct {
solid
bassDrum
// Chiseled specifies if the resin bricks is its chiseled variant.
Chiseled bool
}
// BreakInfo ...
func (r ResinBricks) BreakInfo() BreakInfo {
return newBreakInfo(1.5, pickaxeHarvestable, pickaxeEffective, oneOf(r)).withBlastResistance(30)
}
// EncodeItem ...
func (r ResinBricks) EncodeItem() (name string, meta int16) {
if r.Chiseled {
return "minecraft:chiseled_resin_bricks", 0
}
return "minecraft:resin_bricks", 0
}
// EncodeBlock ...
func (r ResinBricks) EncodeBlock() (string, map[string]any) {
if r.Chiseled {
return "minecraft:chiseled_resin_bricks", nil
}
return "minecraft:resin_bricks", nil
}