org.bukkit.material
Class Mushroom

java.lang.Object
  extended by org.bukkit.material.MaterialData
      extended by org.bukkit.material.Mushroom
All Implemented Interfaces:
Cloneable

public class Mushroom
extends MaterialData

Represents a huge mushroom block


Constructor Summary
Mushroom(int type, byte data)
           
Mushroom(Material shroom)
           
Mushroom(Material shroom, byte data)
           
 
Method Summary
 Mushroom clone()
           
 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.
 String toString()
           
 
Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mushroom

public Mushroom(Material shroom)

Mushroom

public Mushroom(Material shroom,
                byte data)

Mushroom

public Mushroom(int type,
                byte data)
Method Detail

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 Set<BlockFace> getPaintedFaces()
Returns:
A set of all faces that are currently painted (an empty set if it is a stem)

toString

public String toString()
Overrides:
toString in class MaterialData

clone

public Mushroom clone()
Overrides:
clone in class MaterialData


Copyright © 2013. All Rights Reserved.