程序包 org.bukkit.generator

# 接口 ChunkGenerator.ChunkData

封闭类:
  ChunkGenerator

public static interface ChunkGenerator.ChunkData
Data for a Chunk.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull Biome`
  `getBiome(int x, int y, int z)`
  Get the biome at x, y, z within chunk being generated
  `@NotNull BlockData`
  `getBlockData(int x, int y, int z)`
  Get the type and data of the block at x, y, z.
  `byte`
  `getData(int x, int y, int z)`
  已过时。
  Uses magic values
  `int`
  `getMaxHeight()`
  Get the maximum height for this ChunkData.
  `int`
  `getMinHeight()`
  Get the minimum height for this ChunkData.
  `@NotNull Material`
  `getType(int x, int y, int z)`
  Get the type of the block at x, y, z.
  `@NotNull MaterialData`
  `getTypeAndData(int x, int y, int z)`
  Get the type and data of the block at x, y, z.
  `void`
  `setBlock(int x, int y, int z, @NotNull BlockData blockData)`
  Set the block at x,y,z in the chunk data to material.
  `void`
  `setBlock(int x, int y, int z, @NotNull Material material)`
  Set the block at x,y,z in the chunk data to material.
  `void`
  `setBlock(int x, int y, int z, @NotNull MaterialData material)`
  Set the block at x,y,z in the chunk data to material.
  `void`
  `setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull BlockData blockData)`
  Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material.
  `void`
  `setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull Material material)`
  Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material.
  `void`
  `setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull MaterialData material)`
  Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material.

- ## 方法详细资料

  - ### getMinHeight

    int getMinHeight()
    Get the minimum height for this ChunkData.

    It is not guaranteed that this method will return the same value as `WorldInfo.getMinHeight()`.

    Setting blocks below this height will do nothing.

    返回:
      the minimum height

  - ### getMaxHeight

    int getMaxHeight()
    Get the maximum height for this ChunkData.

    It is not guaranteed that this method will return the same value as `WorldInfo.getMaxHeight()`.

    Setting blocks at or above this height will do nothing.

    返回:
      the maximum height

  - ### getBiome

    @NotNull @NotNull Biome getBiome(int x, int y, int z)
    Get the biome at x, y, z within chunk being generated
    参数:
      `x` - the x location in the chunk from 0-15 inclusive
      `y` - the y location in the chunk from minimum (inclusive) - maxHeight (exclusive)
      `z` - the z location in the chunk from 0-15 inclusive
    返回:
      Biome value

  - ### setBlock

    void setBlock(int x, int y, int z, @NotNull @NotNull Material material)
    Set the block at x,y,z in the chunk data to material. Note: setting blocks outside the chunk's bounds does nothing.
    参数:
      `x` - the x location in the chunk from 0-15 inclusive
      `y` - the y location in the chunk from minHeight (inclusive) - maxHeight (exclusive)
      `z` - the z location in the chunk from 0-15 inclusive
      `material` - the type to set the block to

  - ### setBlock

    void setBlock(int x, int y, int z, @NotNull @NotNull MaterialData material)
    Set the block at x,y,z in the chunk data to material. Setting blocks outside the chunk's bounds does nothing.
    参数:
      `x` - the x location in the chunk from 0-15 inclusive
      `y` - the y location in the chunk from minHeight (inclusive) - maxHeight (exclusive)
      `z` - the z location in the chunk from 0-15 inclusive
      `material` - the type to set the block to

  - ### setBlock

    void setBlock(int x, int y, int z, @NotNull @NotNull BlockData blockData)
    Set the block at x,y,z in the chunk data to material. Setting blocks outside the chunk's bounds does nothing.
    参数:
      `x` - the x location in the chunk from 0-15 inclusive
      `y` - the y location in the chunk from minHeight (inclusive) - maxHeight (exclusive)
      `z` - the z location in the chunk from 0-15 inclusive
      `blockData` - the type to set the block to

  - ### setRegion

    void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull @NotNull Material material)
    Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material. Setting blocks outside the chunk's bounds does nothing.
    参数:
      `xMin` - minimum x location (inclusive) in the chunk to set
      `yMin` - minimum y location (inclusive) in the chunk to set
      `zMin` - minimum z location (inclusive) in the chunk to set
      `xMax` - maximum x location (exclusive) in the chunk to set
      `yMax` - maximum y location (exclusive) in the chunk to set
      `zMax` - maximum z location (exclusive) in the chunk to set
      `material` - the type to set the blocks to

  - ### setRegion

    void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull @NotNull MaterialData material)
    Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material. Setting blocks outside the chunk's bounds does nothing.
    参数:
      `xMin` - minimum x location (inclusive) in the chunk to set
      `yMin` - minimum y location (inclusive) in the chunk to set
      `zMin` - minimum z location (inclusive) in the chunk to set
      `xMax` - maximum x location (exclusive) in the chunk to set
      `yMax` - maximum y location (exclusive) in the chunk to set
      `zMax` - maximum z location (exclusive) in the chunk to set
      `material` - the type to set the blocks to

  - ### setRegion

    void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull @NotNull BlockData blockData)
    Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material. Setting blocks outside the chunk's bounds does nothing.
    参数:
      `xMin` - minimum x location (inclusive) in the chunk to set
      `yMin` - minimum y location (inclusive) in the chunk to set
      `zMin` - minimum z location (inclusive) in the chunk to set
      `xMax` - maximum x location (exclusive) in the chunk to set
      `yMax` - maximum y location (exclusive) in the chunk to set
      `zMax` - maximum z location (exclusive) in the chunk to set
      `blockData` - the type to set the blocks to

  - ### getType

    @NotNull @NotNull Material getType(int x, int y, int z)
    Get the type of the block at x, y, z. Getting blocks outside the chunk's bounds returns air.
    参数:
      `x` - the x location in the chunk from 0-15 inclusive
      `y` - the y location in the chunk from minHeight (inclusive) - maxHeight (exclusive)
      `z` - the z location in the chunk from 0-15 inclusive
    返回:
      the type of the block or Material.AIR if x, y or z are outside the chunk's bounds

  - ### getTypeAndData

    @NotNull @NotNull MaterialData getTypeAndData(int x, int y, int z)
    Get the type and data of the block at x, y, z. Getting blocks outside the chunk's bounds returns air.
    参数:
      `x` - the x location in the chunk from 0-15 inclusive
      `y` - the y location in the chunk from minHeight (inclusive) - maxHeight (exclusive)
      `z` - the z location in the chunk from 0-15 inclusive
    返回:
      the type and data of the block or the MaterialData for air if x, y or z are outside the chunk's bounds

  - ### getBlockData

    @NotNull @NotNull BlockData getBlockData(int x, int y, int z)
    Get the type and data of the block at x, y, z. Getting blocks outside the chunk's bounds returns air.
    参数:
      `x` - the x location in the chunk from 0-15 inclusive
      `y` - the y location in the chunk from minHeight (inclusive) - maxHeight (exclusive)
      `z` - the z location in the chunk from 0-15 inclusive
    返回:
      the data of the block or the BlockData for air if x, y or z are outside the chunk's bounds

  - ### getData

    @Deprecated byte getData(int x, int y, int z)
    已过时。
    Uses magic values
    Get the block data at x,y,z in the chunk data. Getting blocks outside the chunk's bounds returns 0.
    参数:
      `x` - the x location in the chunk from 0-15 inclusive
      `y` - the y location in the chunk from minHeight (inclusive) - maxHeight (exclusive)
      `z` - the z location in the chunk from 0-15 inclusive
    返回:
      the block data value or air if x, y or z are outside the chunk's bounds