Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.material.WoodenStep Class Reference
Inheritance diagram for org.bukkit.material.WoodenStep:
org.bukkit.material.MaterialData

Public Member Functions

 WoodenStep (final int type)
 
 WoodenStep (TreeSpecies species)
 
 WoodenStep (TreeSpecies species, boolean inv)
 
 WoodenStep (final int type, final byte data)
 
 WoodenStep (final Material type, final byte data)
 
TreeSpecies getSpecies ()
 
void setSpecies (TreeSpecies species)
 
boolean isInverted ()
 
void setInverted (boolean inv)
 
WoodenStep clone ()
 
String toString ()
 
- Public Member Functions inherited from org.bukkit.material.MaterialData
 MaterialData (final int type)
 
 MaterialData (final Material type)
 
 MaterialData (final int type, final byte data)
 
 MaterialData (final Material type, final byte data)
 
byte getData ()
 
void setData (byte data)
 
Material getItemType ()
 
int getItemTypeId ()
 
ItemStack toItemStack ()
 
ItemStack toItemStack (int amount)
 
String toString ()
 
int hashCode ()
 
boolean equals (Object obj)
 
MaterialData clone ()
 

Detailed Description

Represents the different types of wooden steps.

Definition at line 9 of file WoodenStep.java.

Constructor & Destructor Documentation

org.bukkit.material.WoodenStep.WoodenStep ( final int  type)
Deprecated:
Magic value

Definition at line 20 of file WoodenStep.java.

20  {
21  super(type);
22  }
org.bukkit.material.WoodenStep.WoodenStep ( final int  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 40 of file WoodenStep.java.

40  {
41  super(type, data);
42  }
org.bukkit.material.WoodenStep.WoodenStep ( final Material  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 49 of file WoodenStep.java.

49  {
50  super(type, data);
51  }

Member Function Documentation

TreeSpecies org.bukkit.material.WoodenStep.getSpecies ( )

Gets the current species of this tree

Returns
TreeSpecies of this tree

Definition at line 58 of file WoodenStep.java.

References org.bukkit.TreeSpecies.getByData(), and org.bukkit.material.MaterialData.getData().

58  {
59  return TreeSpecies.getByData((byte) (getData() & 0x3));
60  }
boolean org.bukkit.material.WoodenStep.isInverted ( )

Test if step is inverted

Returns
true if inverted (top half), false if normal (bottom half)

Definition at line 76 of file WoodenStep.java.

References org.bukkit.material.MaterialData.getData().

76  {
77  return ((getData() & 0x8) != 0);
78  }
void org.bukkit.material.WoodenStep.setInverted ( boolean  inv)

Set step inverted state

Parameters
inv- true if step is inverted (top half), false if step is normal (bottom half)

Definition at line 86 of file WoodenStep.java.

References org.bukkit.material.MaterialData.getData(), and org.bukkit.material.MaterialData.setData().

86  {
87  int dat = getData() & 0x7;
88  if (inv) {
89  dat |= 0x8;
90  }
91  setData((byte) dat);
92  }
void org.bukkit.material.WoodenStep.setSpecies ( TreeSpecies  species)

Sets the species of this tree

Parameters
speciesNew species of this tree

Definition at line 67 of file WoodenStep.java.

References org.bukkit.material.MaterialData.getData(), org.bukkit.TreeSpecies.getData(), and org.bukkit.material.MaterialData.setData().

67  {
68  setData((byte) ((getData() & 0xC) | species.getData()));
69  }

The documentation for this class was generated from the following file: