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

Public Member Functions

 NetherWarts (NetherWartsState state)
 
 NetherWarts (final int type)
 
 NetherWarts (final Material type)
 
 NetherWarts (final int type, final byte data)
 
 NetherWarts (final Material type, final byte data)
 
NetherWartsState getState ()
 
void setState (NetherWartsState state)
 
String toString ()
 
NetherWarts clone ()
 
- 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 nether wart

Definition at line 9 of file NetherWarts.java.

Constructor & Destructor Documentation

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

Definition at line 24 of file NetherWarts.java.

24  {
25  super(type);
26  }
org.bukkit.material.NetherWarts.NetherWarts ( final int  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 37 of file NetherWarts.java.

37  {
38  super(type, data);
39  }
org.bukkit.material.NetherWarts.NetherWarts ( final Material  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 46 of file NetherWarts.java.

46  {
47  super(type, data);
48  }

Member Function Documentation

NetherWartsState org.bukkit.material.NetherWarts.getState ( )

Gets the current growth state of this nether wart

Returns
NetherWartsState of this nether wart

Definition at line 55 of file NetherWarts.java.

References org.bukkit.material.MaterialData.getData(), org.bukkit.NetherWartsState.RIPE, org.bukkit.NetherWartsState.SEEDED, org.bukkit.NetherWartsState.STAGE_ONE, and org.bukkit.NetherWartsState.STAGE_TWO.

55  {
56  switch (getData()) {
57  case 0:
58  return NetherWartsState.SEEDED;
59  case 1:
60  return NetherWartsState.STAGE_ONE;
61  case 2:
62  return NetherWartsState.STAGE_TWO;
63  default:
64  return NetherWartsState.RIPE;
65  }
66  }
void org.bukkit.material.NetherWarts.setState ( NetherWartsState  state)

Sets the growth state of this nether wart

Parameters
stateNew growth state of this nether wart

Definition at line 73 of file NetherWarts.java.

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

73  {
74  switch (state) {
75  case SEEDED:
76  setData((byte) 0x0);
77  return;
78  case STAGE_ONE:
79  setData((byte) 0x1);
80  return;
81  case STAGE_TWO:
82  setData((byte) 0x2);
83  return;
84  case RIPE:
85  setData((byte) 0x3);
86  return;
87  }
88  }

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