SPIGOT-1244, SPIGOT-6860, SPIGOT-6874: Various Javadoc and formatting fixes

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
Bukkit/Spigot
2022-09-24 09:31:42 +10:00
parent fc3825afec
commit 869f647744
10 changed files with 62 additions and 25 deletions

View File

@@ -9,6 +9,7 @@ import java.util.Map;
import java.util.function.Consumer;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.block.Block;
import org.bukkit.block.data.Ageable;
import org.bukkit.block.data.AnaloguePowerable;
import org.bukkit.block.data.Bisected;
@@ -7334,9 +7335,22 @@ public enum Material implements Keyed {
}
/**
* Check if the material is a block and completely blocks vision
* Check if the material is a block and occludes light in the lighting engine.
* <p>
* Generally speaking, most full blocks will occlude light. Non-full blocks are
* not occluding (e.g. anvils, chests, tall grass, stairs, etc.), nor are specific
* full blocks such as barriers or spawners which block light despite their texture.
* <p>
* An occluding block will have the following effects:
* <ul>
* <li>Chests cannot be opened if an occluding block is above it.
* <li>Mobs cannot spawn inside of occluding blocks.
* <li>Only occluding blocks can be "powered" ({@link Block#isBlockPowered()}).
* </ul>
* This list may be inconclusive. For a full list of the side effects of an occluding
* block, see the <a href="https://minecraft.fandom.com/wiki/Opacity">Minecraft Wiki</a>.
*
* @return True if this material is a block and completely blocks vision
* @return True if this material is a block and occludes light
*/
public boolean isOccluding() {
if (!isBlock()) {