Bug Closed · Resolved

Blockmask onlyair attribute includes all non-occluding blocks

#4797 opened by Unknown 2 years ago

Unknownreported this bug

Summary

Even with onlyair set to true in blockmask, blocks such as glass and stained glass will also be masked. The documentation specifies it is only air, but that just isn't the case.

Steps to reproduce

Call blockmask with onlyair set to true, create a sphere around current location and have the floor made of stained glass

Current behavior

The non-air blocks are masked

Intended correct behavior

The non-air blocks are not masked

Proposed fixes

Change logic in BlockMaskEffect.java to match other classes that use MaskEffect.ONLY_AIR

BukkitAdapter.adapt(newloc).getBlock().getType() == Material.AIR or block.getType().isAir()

instead of

!newloc.getBlock().getType().isOccluding()

Unknowncommented

Closing due to inactivity and major version changes. If this is still a relevant issue, please re-post with a modern-version server log and current steps to reproduce.

Sign in to join the discussion.