mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 00:52:22 -07:00
SPIGOT-1244, SPIGOT-6860, SPIGOT-6874: Various Javadoc and formatting fixes
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user