mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-28 18:21:20 +01:00
Check non-waterloggable waterlogged blocks for liquid flow.
Fixes #1616.
This commit is contained in:
parent
f8e2d8d6b7
commit
1710c07623
@ -132,9 +132,10 @@ public void onBlockFromTo(BlockFromToEvent event) {
|
||||
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());
|
||||
|
@ -962,7 +962,8 @@ public static boolean isLiquid(Material material) {
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user