接口 LimitedRegion

所有超级接口:
RegionAccessor

public interface LimitedRegion extends RegionAccessor
有限区域用于世界生成中跨越区块的特性,例如树木或矿石. 使用 getBuffer() 来了解你可以超出中心区块多少. 缓冲区可能已经填充,也可能尚未填充. 坐标是相对于世界原点的绝对坐标.
  • 方法详细资料

    • 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

      boolean isInRegion(@NotNull @NotNull Location location)
      检查给定的 Location 是否在区域内.

      原文: Checks if the given Location is in the region.

      参数:
      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

      @NotNull @NotNull List<BlockState> getTileEntities()
      获取有限区域中所有方块实体的列表,包括缓冲区.

      原文: Gets a list of all tile entities in the limited region including the buffer zone.

      返回:
      方块实体的列表