Check non-waterloggable waterlogged blocks for liquid flow.

Fixes #1616.
This commit is contained in:
wizjany 2020-07-29 23:39:04 -04:00
parent f8e2d8d6b7
commit 1710c07623
2 changed files with 6 additions and 4 deletions

View File

@ -132,9 +132,10 @@ public class WorldGuardBlockListener implements Listener {
Block blockFrom = event.getBlock();
Block blockTo = event.getToBlock();
boolean isWater = blockFrom.getType() == Material.WATER;
boolean isLava = blockFrom.getType() == Material.LAVA;
boolean isAir = blockFrom.getType() == Material.AIR;
Material fromType = blockFrom.getType();
boolean isWater = Materials.isWater(fromType);
boolean isLava = fromType == Material.LAVA;
boolean isAir = fromType == Material.AIR;
ConfigurationManager cfg = WorldGuard.getInstance().getPlatform().getGlobalStateManager();
WorldConfiguration wcfg = getWorldConfig(event.getBlock().getWorld());

View File

@ -962,7 +962,8 @@ public final class Materials {
* @return true if a water block
*/
public static boolean isWater(Material material) {
return material == Material.WATER || material == Material.BUBBLE_COLUMN;
return material == Material.WATER || material == Material.BUBBLE_COLUMN
|| material == Material.KELP_PLANT || material == Material.SEAGRASS || material == Material.TALL_SEAGRASS;
}
/**