Class Rails

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ExtendedRails

@Deprecated(since="1.14.1") public class Rails extends MaterialData
Deprecated.
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents minecart rails.
  • Constructor Details Link icon

    • Rails Link icon

      public Rails()
      Deprecated.
    • Rails Link icon

      public Rails(Material type)
      Deprecated.
    • Rails Link icon

      @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 Link icon

    • isOnSlope Link icon

      public boolean isOnSlope()
      Deprecated.
      Returns:
      the whether this track is set on a slope
    • isCurve Link icon

      public boolean isCurve()
      Deprecated.
      Returns:
      the whether this track is set as a curve
    • getDirection Link icon

      public BlockFace getDirection()
      Deprecated.
      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 Link icon

      public String toString()
      Deprecated.
      Overrides:
      toString in class MaterialData
    • getConvertedData Link icon

      @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 Link icon

      public void setDirection(BlockFace face, boolean isOnSlope)
      Deprecated.
      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 Link icon

      public Rails clone()
      Deprecated.
      Overrides:
      clone in class MaterialData