Class Rails

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ExtendedRails

@Deprecated(since="1.13", forRemoval=true) public class Rails extends MaterialData
Deprecated, for removal: This API element is subject to removal in a future version.
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents minecart rails.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Rails(Material type, byte data)
    Deprecated.
    Magic value
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected byte
    Deprecated.
    Magic value
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setDirection(BlockFace face, boolean isOnSlope)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the direction of these tracks
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.MaterialData

    equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Rails

      public Rails()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Rails

      public Rails(Material type)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Rails

      @Deprecated(since="1.6.2") public Rails(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details

    • isOnSlope

      public boolean isOnSlope()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      the whether this track is set on a slope
    • isCurve

      public boolean isCurve()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      the whether this track is set as a curve
    • getDirection

      public BlockFace getDirection()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class MaterialData
    • getConvertedData

      @Deprecated(since="1.6.2") 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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      clone in class MaterialData