类 Comparator
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Comparator
- 所有已实现的接口:
Cloneable,Directional,Redstone
代表开启或关闭状态的红石比较器.
-
字段概要
字段修饰符和类型字段说明protected static final BlockFaceprotected static final booleanprotected static final boolean -
构造器概要
构造器构造器说明构造一个关闭状态的、默认模式默认朝向(北)的红石比较器.Comparator(int type) 已过时。不安全的参数Comparator(int type, byte data) 已过时。不安全的参数Comparator(BlockFace facingDirection) 构造一个关闭状态的、默认模式指定朝向的红石比较器.Comparator(BlockFace facingDirection, boolean isSubtraction) 构造一个关闭状态的、指定模式指定朝向的红石比较器.Comparator(BlockFace facingDirection, boolean isSubtraction, boolean state) 构造一个开启或关闭状态的、指定模式指定朝向的红石比较器.Comparator(Material type) Comparator(Material type, byte data) 已过时。不安全的参数 -
方法概要
修饰符和类型方法说明clone()获取这个红石比较器的朝向.boolean检测这个红石比较器是否输出信号.boolean检测这个红石比较器是否充能.boolean检测这个红石即比较器是否为减法模式.voidsetFacingDirection(BlockFace face) 设置这个红石比较器的朝向.voidsetSubtractionMode(boolean isSubtraction) 设置该红石比较器是否为减法模式.toString()从类继承的方法 org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
字段详细资料
-
构造器详细资料
-
Comparator
public Comparator()构造一个关闭状态的、默认模式默认朝向(北)的红石比较器.原文:Constructs a comparator switched off, with the default mode (normal) and facing the default direction (north).
-
Comparator
构造一个关闭状态的、默认模式指定朝向的红石比较器.原文:Constructs a comparator switched off, with the default mode (normal) and facing the specified direction.
- 参数:
facingDirection- 朝向- 另请参阅:
-
Comparator
构造一个关闭状态的、指定模式指定朝向的红石比较器.原文:Constructs a comparator switched off, with the specified mode and facing the specified direction.
- 参数:
facingDirection- 朝向isSubtraction- true 如果红石比较器为减法模式- 另请参阅:
-
Comparator
构造一个开启或关闭状态的、指定模式指定朝向的红石比较器.原文:Constructs a comparator switched on or off, with the specified mode and facing the specified direction.
- 参数:
facingDirection- 朝向isSubtraction- true 如果红石比较器为减法模式state- 激活状态- 另请参阅:
-
Comparator
已过时。不安全的参数- 参数:
type- the raw type id
-
Comparator
-
Comparator
已过时。不安全的参数- 参数:
type- the raw type iddata- the raw data value
-
Comparator
已过时。不安全的参数- 参数:
type- the typedata- the raw data value
-
-
方法详细资料
-
setSubtractionMode
public void setSubtractionMode(boolean isSubtraction) 设置该红石比较器是否为减法模式.原文:Sets whether the comparator is in subtraction mode.
- 参数:
isSubtraction- true 如果红石比较器为减法模式
-
isSubtractionMode
public boolean isSubtractionMode()检测这个红石即比较器是否为减法模式.原文:Checks whether the comparator is in subtraction mode
- 返回:
- true 如果红石比较器为减法模式
-
setFacingDirection
设置这个红石比较器的朝向.原文:Sets the direction this comparator is facing
- 指定者:
setFacingDirection在接口中Directional- 参数:
face- 朝向- 另请参阅:
-
getFacing
获取这个红石比较器的朝向.原文:Gets the direction this comparator is facing
- 指定者:
getFacing在接口中Directional- 返回:
- 朝向
- 另请参阅:
-
toString
- 覆盖:
toString在类中MaterialData
-
clone
- 覆盖:
clone在类中MaterialData
-
isPowered
public boolean isPowered()检测这个红石比较器是否充能.原文:Checks if the comparator is powered
-
isBeingPowered
public boolean isBeingPowered()检测这个红石比较器是否输出信号.原文:Checks if the comparator is being powered
- 返回:
- 这个红石比较器是否输出信号
-