Interface BiomeSetter

All Superinterfaces:
AbstractBiomeRenderer
All Known Implementing Classes:
GlobalBiomeSetter

@NullMarked @AsOf("2.1.0") public interface BiomeSetter extends AbstractBiomeRenderer
This utility class provides methods to set the biome of blocks, chunks, and regions in the game.
Since:
0.0.1
  • Field Details

  • Method Details

    • of

      @AsOf("0.0.1") static BiomeSetter of()
      Returns a new instance of the BiomeSetter interface.
      Returns:
      a new instance of the BiomeSetter interface
      Since:
      0.0.1
    • of

      @AsOf("2.1.0") @Obsolete static BiomeSetter of(Plugin provider)
      Returns a new instance of the BiomeSetter interface with the given provider.
      Parameters:
      provider - the provider
      Returns:
      a new instance of the BiomeSetter interface with the given provider
      Since:
      2.1.0
    • of

      @AsOf("2.1.0") static BiomeSetter of(BiomeUpdater updater)
      Returns a new instance of the BiomeSetter interface with the given BiomeUpdater.
      Parameters:
      updater - the BiomeUpdater
      Returns:
      a new instance of the BiomeSetter interface with the given BiomeUpdater
      Since:
      2.1.0
    • getRegionAccessor

      @AsOf("0.0.1") default RegionAccessor getRegionAccessor(Location location)
      Returns the RegionAccessor for the given location.
      Parameters:
      location - the location
      Returns:
      the RegionAccessor for the location
      Since:
      0.0.1
    • setBlockBiome

      @AsOf("0.0.1") void setBlockBiome(Block block, Biome biome)
      Sets the biome of a block to a custom biome.
      Parameters:
      block - the block
      biome - the custom biome
      Since:
      0.0.1
    • setBlockBiome

      @AsOf("0.0.1") void setBlockBiome(Block block, Biome biome, boolean updateBiome)
      Sets the biome of a block to a custom biome. This method uses the UnsafeValues instance to perform unsafe operations. It gets the location of the block and sets its biome to the custom biome. If the 'updateBiome' flag is set to true, the biome of the block is updated immediately.
      Parameters:
      block - The block whose biome is to be set.
      biome - The custom biome to set for the block.
      updateBiome - A flag indicating whether to update the biome of the block immediately.
      Since:
      0.0.1
    • setChunkBiome

      @AsOf("0.0.1") void setChunkBiome(Chunk chunk, Biome biome)
      Sets the biome of a chunk to a custom biome.
      Parameters:
      chunk - the chunk
      biome - the custom biome
      Since:
      0.0.1
    • setChunkBiome

      @AsOf("0.0.1") void setChunkBiome(Chunk chunk, Biome biome, boolean updateBiome)
      Sets the biome of a chunk to a custom biome within the default height range. This method is a convenience method that calls the setChunkBiome method with the default minimum and maximum heights. If the 'updateBiome' flag is set to true, the biome of the chunk is updated immediately.
      Parameters:
      chunk - The chunk whose biome is to be set.
      biome - The custom biome to set for the chunk.
      updateBiome - A flag indicating whether to update the biome of the chunk immediately.
      Since:
      0.0.1
    • setChunkBiome

      @AsOf("0.0.1") void setChunkBiome(Chunk chunk, int minHeight, int maxHeight, Biome biome)
      Sets the biome of a chunk to a custom biome within a height range.
      Parameters:
      chunk - the chunk
      minHeight - the minimum height
      maxHeight - the maximum height
      biome - the custom biome
      Since:
      0.0.1
    • setChunkBiome

      @AsOf("0.0.1") void setChunkBiome(Chunk chunk, int minHeight, int maxHeight, Biome biome, boolean updateBiome)
      Sets the biome of a chunk to a custom biome within a specified height range. This method uses the UnsafeValues instance to perform unsafe operations. It iterates over the blocks in the chunk within the specified height range and sets their biome to the custom biome. If the 'updateBiome' flag is set to true, the biome of the chunk is updated immediately.
      Parameters:
      chunk - The chunk whose biome is to be set.
      minHeight - The minimum height within the chunk for the biome change.
      maxHeight - The maximum height within the chunk for the biome change.
      biome - The custom biome to set for the chunk.
      updateBiome - A flag indicating whether to update the biome of the chunk immediately.
      Since:
      0.0.1
    • setBoundingBoxBiome

      @AsOf("0.0.1") void setBoundingBoxBiome(World world, BoundingBox boundingBox, Biome biome)
      Sets the biome of a bounding box to a custom biome.
      Parameters:
      world - the world
      boundingBox - the bounding box
      biome - the custom biome
      Since:
      0.0.1
    • setRegionBiome

      @AsOf("0.0.1") void setRegionBiome(Location from, Location to, Biome biome)
      Sets the biome of a region to a custom biome.
      Parameters:
      from - the starting location
      to - the ending location
      biome - the custom biome
      Since:
      0.0.1
    • setRegionBiome

      @AsOf("0.0.1") void setRegionBiome(Location from, Location to, Biome biome, boolean updateBiome)
      Sets the biome of a region to a custom biome. This method is a convenience method that calls the setRegionBiome method with the 'updateBiome' flag set to false.
      Parameters:
      from - the starting location
      to - the ending location
      biome - the custom biome
      updateBiome - a flag indicating whether to update the biome of the region immediately
      Since:
      0.0.1
    • setRegionBiome

      @AsOf("0.0.1") void setRegionBiome(World world, Vector from, Vector to, Biome biome)
      Sets the biome of a region to a custom biome.
      Parameters:
      world - the world
      from - the starting vector
      to - the ending vector
      biome - the custom biome
      Since:
      0.0.1
    • setRegionBiome

      @AsOf("0.0.2") void setRegionBiome(World world, Vector from, Vector to, Biome biome, boolean updateBiome)
      Sets the biome of a region to a custom biome. This method is a convenience method that calls the setRegionBiome method with the 'updateBiome' flag set to false.
      Parameters:
      world - the world
      from - the starting vector
      to - the ending vector
      biome - the custom biome
      updateBiome - a flag indicating whether to update the biome of the region immediately
      Since:
      0.0.1
    • setRegionBiome

      @AsOf("0.0.1") void setRegionBiome(World world, Location from, Location to, Biome biome, boolean updateBiome)
      Sets the biome of a region to a custom biome. This method uses the UnsafeValues instance to perform unsafe operations. It iterates over the blocks in the region defined by the 'from' and 'to' vectors and sets their biome to the custom biome. If the 'updateBiome' flag is set to true, the biome of the region is updated immediately.
      Parameters:
      world - The world in which the region is located.
      from - The starting vector of the region.
      to - The ending vector of the region.
      biome - The custom biome to set for the region.
      updateBiome - A flag indicating whether to update the biome of the region immediately.
      Since:
      0.0.2