Cherry pick: * Use Tag.REPLACEABLE instead of manual material listing

This commit is contained in:
Len 2024-07-20 17:09:21 +02:00
parent 40152b5dd9
commit 0acbfa316f

View File

@ -2066,10 +2066,7 @@ class PlayerEventHandler implements Listener
{
result = iterator.next();
Material type = result.getType();
if (type != Material.AIR &&
(!passThroughWater || type != Material.WATER) &&
type != Material.SHORT_GRASS &&
type != Material.SNOW) return result;
if (!Tag.REPLACEABLE.isTagged(type) || (!passThroughWater && type == Material.WATER)) return result;
}
return result;