public class Button extends SimpleAttachableMaterialData implements Redstone
构造器和说明 |
---|
Button() |
Button(int type)
已过时。
不安全的参数
|
Button(int type,
byte data)
已过时。
不安全的参数
|
Button(Material type) |
Button(Material type,
byte data)
已过时。
不安全的参数
|
限定符和类型 | 方法和说明 |
---|---|
Button |
clone() |
BlockFace |
getAttachedFace()
获取这个方块附着的方向.
|
boolean |
isPowered()
获取这个按钮的充能状态.
|
void |
setFacingDirection(BlockFace face)
设置这个按钮所指的方向.
|
void |
setPowered(boolean bool)
设置这个按钮的充能状态.
|
java.lang.String |
toString() |
getFacing
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
public Button()
@Deprecated public Button(int type)
type
- the typepublic Button(Material type)
@Deprecated public Button(int type, byte data)
type
- the raw type iddata
- the raw data value@Deprecated public Button(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 bool)
原文:Sets the current state of this button
bool
- 按钮的充能状态public BlockFace getAttachedFace()
原文:Gets the face that this block is attached on
getAttachedFace
在接口中 Attachable
public void setFacingDirection(BlockFace face)
原文:Sets the direction this button is pointing toward
setFacingDirection
在接口中 Directional
face
- 这个方块的朝向public java.lang.String toString()
toString
在类中 SimpleAttachableMaterialData
public Button clone()
clone
在类中 SimpleAttachableMaterialData