Cherry pick: * Use Tag.REPLACEABLE instead of manual material listing
This commit is contained in:
@@ -2066,10 +2066,7 @@ class PlayerEventHandler implements Listener
|
|||||||
{
|
{
|
||||||
result = iterator.next();
|
result = iterator.next();
|
||||||
Material type = result.getType();
|
Material type = result.getType();
|
||||||
if (type != Material.AIR &&
|
if (!Tag.REPLACEABLE.isTagged(type) || (!passThroughWater && type == Material.WATER)) return result;
|
||||||
(!passThroughWater || type != Material.WATER) &&
|
|
||||||
type != Material.SHORT_GRASS &&
|
|
||||||
type != Material.SNOW) return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user