Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.material.Rails Class Reference

Represents minecart rails. More...

+ Inheritance diagram for org.bukkit.material.Rails:
+ Collaboration diagram for org.bukkit.material.Rails:

Public Member Functions

 Rails ()
 
 Rails (final int type)
 
 Rails (final Material type)
 
 Rails (final int type, final byte data)
 
 Rails (final Material type, final byte data)
 
boolean isOnSlope ()
 
boolean isCurve ()
 
BlockFace getDirection ()
 
String toString ()
 
void setDirection (BlockFace face, boolean isOnSlope)
 Set the direction of these tracks
Note that tracks are bidirectional and that the direction returned is the ascending direction if the track is set on a slope.
 
Rails 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 ()
 Gets the raw data in this material.
 
void setData (byte data)
 Sets the raw data of this material.
 
Material getItemType ()
 Gets the Material that this MaterialData represents.
 
int getItemTypeId ()
 Gets the Material Id that this MaterialData represents.
 
ItemStack toItemStack ()
 Creates a new ItemStack based on this MaterialData.
 
ItemStack toItemStack (int amount)
 Creates a new ItemStack based on this MaterialData.
 
String toString ()
 
int hashCode ()
 
boolean equals (Object obj)
 
MaterialData clone ()
 

Protected Member Functions

byte getConvertedData ()
 Return the data without the extended properties used by PoweredRail and DetectorRail.
 

Detailed Description

Represents minecart rails.

Definition at line 9 of file Rails.java.

Constructor & Destructor Documentation

org.bukkit.material.Rails.Rails ( )

Definition at line 11 of file Rails.java.

References org.bukkit.Material.RAILS.

org.bukkit.material.Rails.Rails ( final int  type)

Definition at line 15 of file Rails.java.

org.bukkit.material.Rails.Rails ( final Material  type)

Definition at line 19 of file Rails.java.

org.bukkit.material.Rails.Rails ( final int  type,
final byte  data 
)

Definition at line 23 of file Rails.java.

org.bukkit.material.Rails.Rails ( final Material  type,
final byte  data 
)

Definition at line 27 of file Rails.java.

Member Function Documentation

Rails org.bukkit.material.Rails.clone ( )

Definition at line 154 of file Rails.java.

References org.bukkit.material.Rails.clone().

Referenced by org.bukkit.material.Rails.clone().

byte org.bukkit.material.Rails.getConvertedData ( )
protected

Return the data without the extended properties used by PoweredRail and DetectorRail.

Overridden in ExtendedRails

Returns
the data without the extended part

Definition at line 103 of file Rails.java.

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

Referenced by org.bukkit.material.Rails.getDirection(), org.bukkit.material.Rails.isCurve(), and org.bukkit.material.Rails.isOnSlope().

BlockFace org.bukkit.material.Rails.getDirection ( )
Returns
the direction these tracks are set
Note that tracks are bidirectional and that the direction returned is the ascending direction if the track is set on a slope. If it is set as a curve, the corner of the track is returned.

Definition at line 56 of file Rails.java.

References org.bukkit.block.BlockFace.EAST, org.bukkit.material.Rails.getConvertedData(), org.bukkit.block.BlockFace.NORTH, org.bukkit.block.BlockFace.NORTH_EAST, org.bukkit.block.BlockFace.NORTH_WEST, org.bukkit.block.BlockFace.SOUTH, org.bukkit.block.BlockFace.SOUTH_EAST, org.bukkit.block.BlockFace.SOUTH_WEST, and org.bukkit.block.BlockFace.WEST.

Referenced by org.bukkit.material.Rails.toString().

boolean org.bukkit.material.Rails.isCurve ( )
Returns
the whether this track is set as a curve

Definition at line 43 of file Rails.java.

References org.bukkit.material.Rails.getConvertedData().

Referenced by org.bukkit.material.Rails.toString().

boolean org.bukkit.material.Rails.isOnSlope ( )
Returns
the whether this track is set on a slope

Definition at line 34 of file Rails.java.

References org.bukkit.material.Rails.getConvertedData().

Referenced by org.bukkit.material.Rails.toString().

void org.bukkit.material.Rails.setDirection ( BlockFace  face,
boolean  isOnSlope 
)

Set the direction of these tracks
Note that tracks are bidirectional and that the direction returned is the ascending direction if the track is set on a slope.

If it is set as a curve, the corner of the track should be supplied.

Parameters
facethe direction the track should be facing
isOnSlopewhether or not the track should be on a slope

Definition at line 117 of file Rails.java.

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

String org.bukkit.material.Rails.toString ( )

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