From ed5ca3d9b49848318286a9a4466178abd4ed6371 Mon Sep 17 00:00:00 2001 From: DaPigGuy Date: Sun, 26 Jan 2025 02:30:33 -0800 Subject: [PATCH] world/world.go: Don't remove liquid if replacing block is displacer --- server/world/world.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/server/world/world.go b/server/world/world.go index 503b557ff..403d3c5ee 100644 --- a/server/world/world.go +++ b/server/world/world.go @@ -285,11 +285,13 @@ func (w *World) setBlock(pos cube.Pos, b Block, opts *SetOpts) { secondLayer = air() b = blockByRuntimeIDOrAir(li) } - } else if liquidDisplacingBlocks[rid] && liquidBlocks[before] { - l := blockByRuntimeIDOrAir(before) - if b.(LiquidDisplacer).CanDisplace(l.(Liquid)) { - c.SetBlock(x, y, z, 1, before) - secondLayer = l + } else if liquidDisplacingBlocks[rid] { + if liquidBlocks[before] { + l := blockByRuntimeIDOrAir(before) + if b.(LiquidDisplacer).CanDisplace(l.(Liquid)) { + c.SetBlock(x, y, z, 1, before) + secondLayer = l + } } } else if li := c.Block(x, y, z, 1); li != airRID { c.SetBlock(x, y, z, 1, airRID)