public class Lever extends SimpleAttachableMaterialData implements Redstone
构造器和说明 |
---|
Lever() |
Lever(int type)
已过时。
不安全的参数
|
Lever(int type,
byte data)
已过时。
不安全的参数
|
Lever(Material type) |
Lever(Material type,
byte data)
已过时。
不安全的参数
|
限定符和类型 | 方法和说明 |
---|---|
Lever |
clone() |
BlockFace |
getAttachedFace()
获取这个方块附着的朝向.
|
boolean |
isPowered()
获取这个拉杆是否被充能.
|
void |
setFacingDirection(BlockFace face)
设置拉杆被指向的方向.
|
void |
setPowered(boolean isPowered)
设置拉杆是否被充能.
|
java.lang.String |
toString() |
getFacing
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
public Lever()
@Deprecated public Lever(int type)
type
- the raw type idpublic Lever(Material type)
@Deprecated public Lever(int type, byte data)
type
- the raw type iddata
- the raw data value@Deprecated public Lever(Material type, byte data)
type
- the typedata
- the raw data valuepublic boolean isPowered()
原文:Gets the current state of this Material, indicating if it's powered or unpowered
public void setPowered(boolean isPowered)
原文:Set this lever to be powered or not.
isPowered
- 拉杆是否被充能public BlockFace getAttachedFace()
原文:Gets the face that this block is attached on
getAttachedFace
在接口中 Attachable
public void setFacingDirection(BlockFace face)
原文:Sets the direction this lever is pointing in
setFacingDirection
在接口中 Directional
face
- 这个方块的朝向public java.lang.String toString()
toString
在类中 SimpleAttachableMaterialData
public Lever clone()
clone
在类中 SimpleAttachableMaterialData