类 Rails

所有已实现的接口:
Cloneable
直接已知子类:
ExtendedRails

@Deprecated(since="1.14.1") public class Rails extends MaterialData
已过时。
所有 MaterialData 的用法都已弃用并可能被移除。 请使用 BlockData。
代表矿车铁轨。
  • 构造器详细资料

    • Rails

      public Rails()
      已过时。
    • Rails

      public Rails(Material type)
      已过时。
    • Rails

      @Deprecated(since="1.6.2") public Rails(Material type, byte data)
      已过时。
      魔法值

      原文:Magic value

      参数:
      type - 物品类型
      data - 原始数据值
  • 方法详细资料

    • isOnSlope

      public boolean isOnSlope()
      已过时。
      返回:
      该铁轨是否设置在斜坡上

      原文:the whether this track is set on a slope

    • isCurve

      public boolean isCurve()
      已过时。
      返回:
      该铁轨是否设置为弯道

      原文:the whether this track is set as a curve

    • getDirection

      public BlockFace getDirection()
      已过时。
      返回:
      这些铁轨设置的方向

      注意铁轨是双向的,如果铁轨设置在斜坡上,返回的方向是上升方向。 如果设置为弯道,则返回铁轨的拐角方向。

      原文: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()
      已过时。
      覆盖:
      toString 在类中 MaterialData
    • getConvertedData

      @Deprecated(since="1.6.2") protected byte getConvertedData()
      已过时。
      魔法值

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

      原文:Magic value

      返回不包含 PoweredRail 和 DetectorRail 使用的扩展属性的数据。 在 ExtendedRails 中被重写。
      返回:
      不包含扩展部分的数据
    • setDirection

      public void setDirection(BlockFace face, boolean isOnSlope)
      已过时。
      设置这些铁轨的方向。

      注意铁轨是双向的,如果铁轨设置在斜坡上,返回的方向是上升方向。 如果设置为弯道,则应提供铁轨的拐角方向。

      参数:
      face - 铁轨应朝向的方向
      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.

    • clone

      public Rails clone()
      已过时。
      覆盖:
      clone 在类中 MaterialData