Skip to content

Commit

Permalink
server/block: Use breakBlock when Carpet blocks lose support
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Jan 9, 2025
1 parent 1f2a621 commit 389cab2
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions server/block/carpet.go
Original file line number Diff line number Diff line change
@@ -50,8 +50,7 @@ func (Carpet) HasLiquidDrops() bool {
// NeighbourUpdateTick ...
func (c Carpet) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
if _, ok := tx.Block(pos.Side(cube.FaceDown)).(Air); ok {
tx.SetBlock(pos, nil, nil)
dropItem(tx, item.NewStack(c, 1), pos.Vec3Centre())
breakBlock(c, pos, tx)
}
}

4 changes: 2 additions & 2 deletions server/block/moss_carpet.go
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@ func (MossCarpet) HasLiquidDrops() bool {
}

// NeighbourUpdateTick ...
func (MossCarpet) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
func (m MossCarpet) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
if _, ok := tx.Block(pos.Side(cube.FaceDown)).(Air); ok {
tx.SetBlock(pos, nil, nil)
breakBlock(m, pos, tx)
}
}

0 comments on commit 389cab2

Please sign in to comment.