Package org.bukkit.material
Class Mushroom
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Mushroom
- All Implemented Interfaces:
java.lang.Cloneable
public class Mushroom extends MaterialData
Represents a huge mushroom block
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Mushroomclone()java.util.Set<BlockFace>getPaintedFaces()booleanisFacePainted(BlockFace face)Checks whether a face of the block is painted.booleanisStem()voidsetFacePainted(BlockFace face, boolean painted)Set a face of the block to be painted or not.voidsetStem()Sets this to be a mushroom stem.java.lang.StringtoString()Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
Constructor Details
-
Method Details
-
isStem
public boolean isStem()- Returns:
- Whether this is a mushroom stem.
-
setStem
public void setStem()Sets this to be a mushroom stem. -
isFacePainted
Checks whether a face of the block is painted.- Parameters:
face- The face to check.- Returns:
- True if it is painted.
-
setFacePainted
Set a face of the block to be painted or not. Note that due to the nature of how the data is stored, setting a face painted or not is not guaranteed to leave the other faces unchanged.- Parameters:
face- The face to paint or unpaint.painted- True if you want to paint it, false if you want the pores to show.
-
getPaintedFaces
- Returns:
- A set of all faces that are currently painted (an empty set if it is a stem)
-
toString
public java.lang.String toString()- Overrides:
toStringin classMaterialData
-
clone
- Overrides:
clonein classMaterialData
-