Skip to content

Commit 389cab2

Browse files
committed
server/block: Use breakBlock when Carpet blocks lose support
1 parent 1f2a621 commit 389cab2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

server/block/carpet.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ func (Carpet) HasLiquidDrops() bool {
5050
// NeighbourUpdateTick ...
5151
func (c Carpet) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
5252
if _, ok := tx.Block(pos.Side(cube.FaceDown)).(Air); ok {
53-
tx.SetBlock(pos, nil, nil)
54-
dropItem(tx, item.NewStack(c, 1), pos.Vec3Centre())
53+
breakBlock(c, pos, tx)
5554
}
5655
}
5756

server/block/moss_carpet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ func (MossCarpet) HasLiquidDrops() bool {
2525
}
2626

2727
// NeighbourUpdateTick ...
28-
func (MossCarpet) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
28+
func (m MossCarpet) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
2929
if _, ok := tx.Block(pos.Side(cube.FaceDown)).(Air); ok {
30-
tx.SetBlock(pos, nil, nil)
30+
breakBlock(m, pos, tx)
3131
}
3232
}
3333

0 commit comments

Comments
 (0)