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.
This report was taken directly from the user Mykindos, since it encapsulates the issue perfectly, and also proposes some fixes with progamming magic that I am too smoothbrained to understand xd. I included a few examples of code to reproduce. The issue was closed without feedback https://git.mythiccraft.io/mythiccraft/MythicMobs/-/issues/1503
Steps to reproduce
Call blockmask with onlyair set to true, create a sphere around current location and have the floor made of stained glass
An example given by myself, in a pack:
- effect:blockmask{m=LIGHT[level=8];r=0.1;duration=4;onlyair=true;noise=0.1;occ=false} @randomLocationsNearCaster{a=1;radius=1;yoffset=<random.float.1to2>} ~onTimer:1
The given example tries some randomness, but the behavior seems to be consistently broken.
Current behavior
The non-air blocks are masked. This can include slabs, torches, fluids, etc.
Intended correct behavior
The non-air blocks are not masked.
Proposed fixes
(This section belongs to Mykindos alone, since i don't know about this.)
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()