From 798e0eec04c04f667f39ebeaf79753d81c91d1a4 Mon Sep 17 00:00:00 2001 From: DaPigGuy Date: Mon, 6 Jan 2025 05:41:12 -0800 Subject: [PATCH] block/decorated_pot.go: Always drop the pot on break The wiki tells lies --- server/block/decorated_pot.go | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/server/block/decorated_pot.go b/server/block/decorated_pot.go index 88925007e..d0c62a55d 100644 --- a/server/block/decorated_pot.go +++ b/server/block/decorated_pot.go @@ -80,21 +80,7 @@ func (p DecoratedPot) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.U // BreakInfo ... func (p DecoratedPot) BreakInfo() BreakInfo { - return newBreakInfo(0, alwaysHarvestable, nothingEffective, func(tool item.Tool, enchantments []item.Enchantment) []item.Stack { - if hasSilkTouch(enchantments) { - p.Item = item.Stack{} - return []item.Stack{item.NewStack(p, 1)} - } - var drops []item.Stack - for _, d := range p.Decorations { - if d == nil { - drops = append(drops, item.NewStack(item.Brick{}, 1)) - continue - } - drops = append(drops, item.NewStack(d, 1)) - } - return drops - }).withBreakHandler(func(pos cube.Pos, tx *world.Tx, u item.User) { + return newBreakInfo(0, alwaysHarvestable, nothingEffective, oneOf(DecoratedPot{Decorations: p.Decorations})).withBreakHandler(func(pos cube.Pos, tx *world.Tx, u item.User) { if !p.Item.Empty() { dropItem(tx, p.Item, pos.Vec3Centre()) }