程序包 org.bukkit

接口 ChunkSnapshot


public interface ChunkSnapshot
表示一个静态的,线程安全的方块的区块的快照.

目的是允许清洁高效地复制一个区块的数据,然后在另一个线程(例如,地图渲染)中处理.

  • 方法概要

    修饰符和类型
    方法
    说明
    getBiome(int x, int z)
    获取指定坐标的生物群系.
    int
    getBlockData(int x, int y, int z)
    已过时。
    不安全的参数
    int
    getBlockEmittedLight(int x, int y, int z)
    获取区块中对应坐标方块的发光亮度等级.
    int
    getBlockSkyLight(int x, int y, int z)
    获取区块中对应坐标方块的天空亮度等级.
    getBlockType(int x, int y, int z)
    获取区块中对应坐标方块的方块类型.
    int
    getBlockTypeId(int x, int y, int z)
    已过时。
    不安全的参数
    long
    抓取区块快照时获取世界的完整时间.
    int
    getHighestBlockYAt(int x, int z)
    获取指定坐标最高非空气方块的Y坐标.
    double
    getRawBiomeRainfall(int x, int z)
    已过时。
    在当前的Minecraft版本(1.12)中不存在这个区块属性
    double
    getRawBiomeTemperature(int x, int z)
    获取指定坐标原始生物群系的温度(范围为0.0到1.0).
    获取指定区块所在世界的名称.
    int
    获取指定区块的X坐标.
    int
    获取指定区块的Z坐标.
    boolean
    测试区块是否为空.
  • 方法详细资料

    • getX

      int getX()
      获取指定区块的X坐标. 原文: Gets the X-coordinate of this chunk
      返回:
      X坐标
    • getZ

      int getZ()
      获取指定区块的Z坐标. 原文: Gets the Z-coordinate of this chunk
      返回:
      Z坐标
    • getWorldName

      String getWorldName()
      获取指定区块所在世界的名称. 原文: Gets name of the world containing this chunk
      返回:
      所在世界的名称
    • getBlockType

      Material getBlockType(int x, int y, int z)
      获取区块中对应坐标方块的方块类型.

      原文:Get block type for block at corresponding coordinate in the chunk

      参数:
      x - 0-15
      y - 0-127
      z - 0-15
      返回:
      方块物品类型
    • getBlockTypeId

      @Deprecated int getBlockTypeId(int x, int y, int z)
      已过时。
      不安全的参数
      获取区块中对应坐标方块的方块类型. 原文: Get block type for block at corresponding coordinate in the chunk
      参数:
      x - 0-15
      y - 0-127
      z - 0-15
      返回:
      0-255
    • getBlockData

      @Deprecated int getBlockData(int x, int y, int z)
      已过时。
      不安全的参数
      获取区块中对应坐标方块的方块数据. 原文: Get block data for block at corresponding coordinate in the chunk
      参数:
      x - 0-15
      y - 0-127
      z - 0-15
      返回:
      0-15
    • getBlockSkyLight

      int getBlockSkyLight(int x, int y, int z)
      获取区块中对应坐标方块的天空亮度等级. 原文: Get sky light level for block at corresponding coordinate in the chunk
      参数:
      x - 0-15
      y - 0-127
      z - 0-15
      返回:
      0-15
    • getBlockEmittedLight

      int getBlockEmittedLight(int x, int y, int z)
      获取区块中对应坐标方块的发光亮度等级. 原文: Get light level emitted by block at corresponding coordinate in the chunk
      参数:
      x - 0-15
      y - 0-127
      z - 0-15
      返回:
      0-15
    • getHighestBlockYAt

      int getHighestBlockYAt(int x, int z)
      获取指定坐标最高非空气方块的Y坐标. 原文: Gets the highest non-air coordinate at the given coordinates
      参数:
      x - X-coordinate of the blocks
      z - Z-coordinate of the blocks
      返回:
      最高非空气方块的Y坐标
    • getBiome

      Biome getBiome(int x, int z)
      获取指定坐标的生物群系. 原文: Get biome at given coordinates
      参数:
      x - X坐标
      z - Z坐标
      返回:
      指定坐标的生物群系
    • getRawBiomeTemperature

      double getRawBiomeTemperature(int x, int z)
      获取指定坐标原始生物群系的温度(范围为0.0到1.0). 原文: Get raw biome temperature (0.0-1.0) at given coordinate
      参数:
      x - X坐标
      z - Z坐标
      返回:
      指定坐标的温度
    • getRawBiomeRainfall

      @Deprecated double getRawBiomeRainfall(int x, int z)
      已过时。
      在当前的Minecraft版本(1.12)中不存在这个区块属性
      获取指定坐标原始生物群系的降雨量(范围为0.0到1.0). 原文: Get raw biome rainfall (0.0-1.0) at given coordinate
      参数:
      x - X坐标
      z - Z坐标
      返回:
      指定坐标的降雨量
    • getCaptureFullTime

      long getCaptureFullTime()
      抓取区块快照时获取世界的完整时间. 原文: Get world full time when chunk snapshot was captured
      返回:
      时间,用tick表示
    • isSectionEmpty

      boolean isSectionEmpty(int sy)
      测试区块是否为空. 原文: Test if section is empty
      参数:
      sy - -区块的Y坐标(方块Y坐标整除16)
      返回:
      如果为空则返回true,否则返回false