Skip to content

Commit 34ad7db

Browse files
committed
block/block.go: Also check liquid in replaceableWith
1 parent ed5ca3d commit 34ad7db

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

server/block/block.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,14 @@ func replaceableWith(tx *world.Tx, pos cube.Pos, with world.Block) bool {
135135
}
136136
b := tx.Block(pos)
137137
if replaceable, ok := b.(Replaceable); ok {
138-
return replaceable.ReplaceableBy(with) && b != with
138+
if !replaceable.ReplaceableBy(with) || b == with {
139+
return false
140+
}
141+
if liquid, ok := tx.Liquid(pos); ok {
142+
replaceable, ok := liquid.(Replaceable)
143+
return ok && replaceable.ReplaceableBy(with)
144+
}
145+
return true
139146
}
140147
return false
141148
}

0 commit comments

Comments
 (0)