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 Details

    • Mushroom

      public Mushroom​(Material shroom)
    • Mushroom

      @Deprecated public Mushroom​(Material shroom, byte data)
      Deprecated.
      Magic value
      Parameters:
      shroom - the type
      data - the raw data value
    • Mushroom

      @Deprecated public Mushroom​(int type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the raw type id
      data - the raw data value
  • 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

      public boolean isFacePainted​(BlockFace face)
      Checks whether a face of the block is painted.
      Parameters:
      face - The face to check.
      Returns:
      True if it is painted.
    • setFacePainted

      public void setFacePainted​(BlockFace face, boolean painted)
      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

      public java.util.Set<BlockFace> 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 class MaterialData
    • clone

      public Mushroom clone()
      Overrides:
      clone in class MaterialData