Skip to content

Commit ed5ca3d

Browse files
committed
world/world.go: Don't remove liquid if replacing block is displacer
1 parent ed8edb8 commit ed5ca3d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

server/world/world.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,13 @@ func (w *World) setBlock(pos cube.Pos, b Block, opts *SetOpts) {
285285
secondLayer = air()
286286
b = blockByRuntimeIDOrAir(li)
287287
}
288-
} else if liquidDisplacingBlocks[rid] && liquidBlocks[before] {
289-
l := blockByRuntimeIDOrAir(before)
290-
if b.(LiquidDisplacer).CanDisplace(l.(Liquid)) {
291-
c.SetBlock(x, y, z, 1, before)
292-
secondLayer = l
288+
} else if liquidDisplacingBlocks[rid] {
289+
if liquidBlocks[before] {
290+
l := blockByRuntimeIDOrAir(before)
291+
if b.(LiquidDisplacer).CanDisplace(l.(Liquid)) {
292+
c.SetBlock(x, y, z, 1, before)
293+
secondLayer = l
294+
}
293295
}
294296
} else if li := c.Block(x, y, z, 1); li != airRID {
295297
c.SetBlock(x, y, z, 1, airRID)

0 commit comments

Comments
 (0)