Skip to content

Commit

Permalink
block/decorated_pot.go: Always drop the pot on break
Browse files Browse the repository at this point in the history
The wiki tells lies
  • Loading branch information
DaPigGuy committed Jan 6, 2025
1 parent 0bb52c5 commit 798e0ee
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions server/block/decorated_pot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down

0 comments on commit 798e0ee

Please sign in to comment.