Fill in gaps according to light level
LadyCailinBot opened this issue ยท 10 comments
WORLDEDIT-3124 - Reported by CommodoreAlpha
When selecting a region and using either "/set " or "/replace ", there should be an additional, optional argument allowing you to specify the light-level required for the block to be replaced.
Examples can include "0" to indicate that only blocks with a light-level of 0 should be replaced (so, all solid blocks and all transparent blocks including air that have no light), ">7" to indicate that only transparent blocks with a light level greater than 7 should be replaced, and etc.
Although seemingly impractical, it could be a useful feature for nitpicky users who don't like air-pockets within anything they build (one reason being that it makes annoying ambient sounds). For instance, I would sometimes find myself terraforming via the "smooth-brush" only to find that I would occasionally leave behind an air-pocket in the hillsides I create.
Comment by CommodoreAlpha
That's a great way of summarising my suggestion, although I didn't know masks could also be applied to region-editing operations.
Comment by PseudoKnight
While masks do not support light levels, masks could still be used for filling in pockets of air or other undesirable block types.
You can choose non-solid blocks with "/gmask !#solid", though a few solid blocks were accidentally classified as non-solid: carpet, repeaters, and comparators.
A side note: when double checking there were no light level parameters, I found a few that are missing from the wiki: #solid, #dsel, %50 (percentages), $biomename.
Comment by sk89q
Well masks can "mask out" anything.
But there is no light mask -- that is true. I will consider adding it.
Percentages should be documented on the wiki though. That's a pretty ancient feature.
Comment by PseudoKnight
It's possible some of those can be found in other places in the wiki, but not in the masks section:
http://wiki.sk89q.com/wiki/WorldEdit/Masks
Comment by sk89q
Well, the % thing is not a mask -- it's a pattern.
Masks determine ''what'' is replaced, while patterns determine what something is replaced ''with''.
http://wiki.sk89q.com/wiki/WorldEdit/Block_data_syntax#Patterns
Comment by wizjany
he's talking about the randommask - https://github.com/sk89q/worldedit/blob/5.6.2/src/main/java/com/sk89q/worldedit/masks/RandomMask.java
which has not been around as long as the percentage patterns
Comment by sk89q
I didn't even know that existed, and I'm pretty sure I had to rewrite it for 6.x.
Talk about mindless programming.
Comment by PseudoKnight
Ya, I discovered these in the mask parser. I had never seen or used them before.
https://github.com/sk89q/worldedit/blob/master/src/main/java/com/sk89q/worldedit/extension/registry/DefaultMaskParser.java