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 Mushroom
clone()
java.util.Set<BlockFace>
getPaintedFaces()
boolean
isFacePainted(BlockFace face)
Checks whether a face of the block is painted.boolean
isStem()
void
setFacePainted(BlockFace face, boolean painted)
Set a face of the block to be painted or not.void
setStem()
Sets this to be a mushroom stem.java.lang.String
toString()
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:
toString
in classMaterialData
-
clone
- Overrides:
clone
in classMaterialData
-