类 Lever

所有已实现的接口:
Cloneable, Attachable, Directional, Redstone

@Deprecated(since="1.14.1") public class Lever extends SimpleAttachableMaterialData implements Redstone
已过时。
所有 MaterialData 的使用都已弃用并可能被移除。 使用 BlockData。
代表一个拉杆
  • 构造器详细资料

    • Lever

      public Lever()
      已过时。
    • Lever

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

      @Deprecated(since="1.6.2") public Lever(Material type, byte data)
      已过时。
      魔法值
      参数:
      type - 类型
      data - 原始数据值
  • 方法详细资料

    • isPowered

      public boolean isPowered()
      已过时。
      获取此材质的当前状态,指示其是否已通电
      指定者:
      isPowered 在接口中 Redstone
      返回:
      如果已通电则返回true,否则返回false

      原文:Gets the current state of this Material, indicating if it's powered or unpowered

    • setPowered

      public void setPowered(boolean isPowered)
      已过时。
      设置此拉杆是否通电。
      参数:
      isPowered - 拉杆是否应该通电

      原文:Set this lever to be powered or not.

    • getAttachedFace

      public BlockFace getAttachedFace()
      已过时。
      获取此方块所附着的面
      指定者:
      getAttachedFace 在接口中 Attachable
      返回:
      附着的BlockFace

      原文:Gets the face that this block is attached on

    • setFacingDirection

      public void setFacingDirection(BlockFace face)
      已过时。
      设置此拉杆指向的方向

      原文:Sets the direction this lever is pointing in

      指定者:
      setFacingDirection 在接口中 Directional
      参数:
      face - 朝向
    • toString

      public String toString()
      已过时。
      覆盖:
      toString 在类中 SimpleAttachableMaterialData
    • clone

      public Lever clone()
      已过时。
      覆盖:
      clone 在类中 SimpleAttachableMaterialData