接口 Conduit
- 所有超级接口:
BlockState,Metadatable,PersistentDataHolder,TileState
-
方法概要
从接口继承的方法 org.bukkit.block.BlockState
copy, copy, getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata从接口继承的方法 org.bukkit.block.TileState
getPersistentDataContainer
-
方法详细资料
-
isActive
boolean isActive()检查此潮涌核心是否处于激活状态.原文: Checks whether or not this conduit is active.
A conduit is considered active if there are at least 16 valid frame blocks surrounding it and the conduit is surrounded by a 3x3x3 area of water source blocks (or waterlogged blocks), at which point its animation will activate, start spinning, and apply effects to nearby players. 如果周围有至少16个有效的框架方块, 并且潮涌核心被3x3x3的水源方块(或含水方块)区域包围, 则认为潮涌核心处于激活状态, 此时它的动画将激活, 开始旋转, 并对附近的玩家施加效果.
- 返回:
- 如果激活返回true, 否则返回false
-
isHunting
boolean isHunting()获取此潮涌核心是否正在积极寻找附近的敌对生物.原文: Get whether or not this conduit is actively hunting for nearby hostile creatures.
A conduit will hunt if it is active (see
isActive()) and its frame is complete (it is surrounded by at least 42 valid frame blocks). While hunting, theconduit's target, if within itshunting area, will be damaged every 2 seconds. 如果潮涌核心处于激活状态(参见isActive())且其框架完整(周围有至少42个有效框架方块), 则会进行狩猎. 狩猎时, 如果潮涌核心的目标在其狩猎区域内, 将每2秒受到一次伤害.- 返回:
- 如果正在狩猎返回true, 否则返回false
-
getFrameBlocks
获取构成此潮涌核心框架的所有方块的集合. 返回的集合将只包含潮涌核心所需的有效框架类型的方块, 不包括潮涌核心正在搜索的方块, 这意味着集合的大小将根据调用时潮涌核心周围有多少有效框架而变化.原文: Get a
Collectionof allBlocksthat make up the frame of this conduit. The returned collection will contain only blocks that match the types required by the conduit to make up a valid frame, not the blocks at which the conduit is searching, meaning it will be of variable size depending on how many valid frames are surrounding the conduit at the time of invocation.- 返回:
- 框架方块
-
getFrameBlockCount
int getFrameBlockCount()获取当前围绕潮涌核心的有效框架方块数量.原文: Get the amount of valid frame blocks that are currently surrounding the conduit.
- 返回:
- 框架方块数量
-
getRange
int getRange()获取玩家将获得潮涌核心益处的范围(以方块为单位).原文: Get the range (measured in blocks) within which players will receive the conduit's benefits.
- 返回:
- 潮涌核心范围
-
setTarget
设置潮涌核心的狩猎目标.原文: Set the conduit's hunting target.
Note that the value set by this method may be overwritten by the conduit's periodic hunting logic. If the target is ever set to
null, the conduit will continue to look for a new target. Additionally, if the target is set to an entity that does not meet a conduit's hunting conditions (e.g. the entity is not within thehunting area, has already been killed, etc.) then the passed entity will be ignored and the conduit will also continue to look for a new target. 请注意, 此方法设置的值可能会被潮涌核心的周期性狩猎逻辑覆盖. 如果目标被设置为null, 潮涌核心将继续寻找新目标. 此外, 如果目标被设置为不符合潮涌核心狩猎条件的实体 (例如实体不在狩猎区域内, 已经被杀死等), 则传递的实体将被忽略, 潮涌核心也将继续寻找新目标.- 参数:
target- 目标实体, 或null以移除目标- 返回:
- 如果目标被更改返回true, 如果目标相同返回false
-
getTarget
获取潮涌核心的狩猎目标.原文: Get the conduit's hunting target.
- 返回:
- 狩猎目标, 如果潮涌核心没有目标则返回null
-
hasTarget
boolean hasTarget()检查此潮涌核心是否有活动的(存活的)狩猎目标.原文: Check whether or not this conduit has an active (alive) hunting target.
- 返回:
- 如果有狩猎目标返回true, 否则返回false
-
getHuntingArea
获取潮涌核心将在其中搜索敌对实体作为目标的边界框(相对于真实世界坐标).原文: Get a
BoundingBox(relative to real-world coordinates) in which the conduit will search for hostile entities to target.- 返回:
- 狩猎区域边界框
-