接口 LimitedRegion
- 所有超级接口:
RegionAccessor
有限区域用于世界生成中跨越区块的特性,例如树木或矿石.
使用
getBuffer() 来了解你可以超出中心区块多少.
缓冲区可能已经填充,也可能尚未填充.
坐标是相对于世界原点的绝对坐标.-
方法概要
修饰符和类型方法说明int获取中心区块周围可访问的缓冲区大小.获取有限区域中所有方块实体的列表,包括缓冲区.booleanisInRegion(int x, int y, int z) 检查给定的坐标是否在区域内.booleanisInRegion(@NotNull Location location) 检查给定的Location是否在区域内.从接口继承的方法 org.bukkit.RegionAccessor
addEntity, createEntity, generateTree, generateTree, generateTree, getBiome, getBiome, getBlockData, getBlockData, getBlockState, getBlockState, getEntities, getEntitiesByClass, getEntitiesByClasses, getHighestBlockYAt, getHighestBlockYAt, getHighestBlockYAt, getHighestBlockYAt, getLivingEntities, getType, getType, setBiome, setBiome, setBlockData, setBlockData, setType, setType, spawn, spawn, spawn, spawnEntity, spawnEntity
-
方法详细资料
-
getBuffer
int getBuffer()获取中心区块周围可访问的缓冲区大小. 返回值采用正常的世界坐标比例.原文: Gets the buffer around the central chunk which is accessible. The returned value is in normal world coordinate scale.
For example: If the method returns 16 you have a working area of 48x48.
- 返回:
- X和Z方向上的缓冲区大小
-
isInRegion
- 参数:
location- 要检查的位置- 返回:
- 如果位置在区域内则返回true,否则返回false
-
isInRegion
boolean isInRegion(int x, int y, int z) 检查给定的坐标是否在区域内.原文: Checks if the given coordinates are in the region.
- 参数:
x- 要检查的X坐标y- 要检查的Y坐标z- 要检查的Z坐标- 返回:
- 如果坐标在区域内则返回true,否则返回false
-
getTileEntities
获取有限区域中所有方块实体的列表,包括缓冲区.原文: Gets a list of all tile entities in the limited region including the buffer zone.
- 返回:
- 方块实体的列表
-