org.bukkit.material
Class Rails

java.lang.Object
  extended by org.bukkit.material.MaterialData
      extended by org.bukkit.material.Rails
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ExtendedRails

public class Rails
extends MaterialData

Represents minecart rails.


Constructor Summary
Rails()
           
Rails(int type)
          Deprecated. Magic value
Rails(int type, byte data)
          Deprecated. Magic value
Rails(Material type)
           
Rails(Material type, byte data)
          Deprecated. Magic value
 
Method Summary
 Rails clone()
           
protected  byte getConvertedData()
          Deprecated. Magic value
 BlockFace getDirection()
           
 boolean isCurve()
           
 boolean isOnSlope()
           
 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.
 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

Rails

public Rails()

Rails

@Deprecated
public Rails(int type)
Deprecated. Magic value


Rails

public Rails(Material type)

Rails

@Deprecated
public Rails(int type,
                        byte data)
Deprecated. Magic value


Rails

@Deprecated
public Rails(Material type,
                        byte data)
Deprecated. Magic value

Method Detail

isOnSlope

public boolean isOnSlope()
Returns:
the whether this track is set on a slope

isCurve

public boolean isCurve()
Returns:
the whether this track is set as a curve

getDirection

public BlockFace 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.

toString

public String toString()
Overrides:
toString in class MaterialData

getConvertedData

@Deprecated
protected byte getConvertedData()
Deprecated. Magic value

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

Returns:
the data without the extended part

setDirection

public 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. If it is set as a curve, the corner of the track should be supplied.

Parameters:
face - the direction the track should be facing
isOnSlope - whether or not the track should be on a slope

clone

public Rails clone()
Overrides:
clone in class MaterialData


Copyright © 2013. All Rights Reserved.