Interface BiomeSetter
- All Superinterfaces:
AbstractBiomeRenderer
- All Known Implementing Classes:
GlobalBiomeSetter
This utility class provides methods to set the biome of blocks, chunks, and regions in the game.
- Since:
- 0.0.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptiondefault RegionAccessorgetRegionAccessor(Location location) Returns the RegionAccessor for the given location.static BiomeSetterof()Returns a new instance of the BiomeSetter interface.static BiomeSetterof(BiomeUpdater updater) Returns a new instance of the BiomeSetter interface with the given BiomeUpdater.static BiomeSetterReturns a new instance of the BiomeSetter interface with the given provider.voidsetBlockBiome(Block block, Biome biome) Sets the biome of a block to a custom biome.voidsetBlockBiome(Block block, Biome biome, boolean updateBiome) Sets the biome of a block to a custom biome.voidsetBoundingBoxBiome(World world, BoundingBox boundingBox, Biome biome) Sets the biome of a bounding box to a custom biome.voidsetChunkBiome(Chunk chunk, int minHeight, int maxHeight, Biome biome) Sets the biome of a chunk to a custom biome within a height range.voidsetChunkBiome(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.voidsetChunkBiome(Chunk chunk, Biome biome) Sets the biome of a chunk to a custom biome.voidsetChunkBiome(Chunk chunk, Biome biome, boolean updateBiome) Sets the biome of a chunk to a custom biome within the default height range.voidsetRegionBiome(Location from, Location to, Biome biome) Sets the biome of a region to a custom biome.voidsetRegionBiome(Location from, Location to, Biome biome, boolean updateBiome) Sets the biome of a region to a custom biome.voidsetRegionBiome(World world, Location from, Location to, Biome biome, boolean updateBiome) Sets the biome of a region to a custom biome.voidsetRegionBiome(World world, Vector from, Vector to, Biome biome) Sets the biome of a region to a custom biome.voidsetRegionBiome(World world, Vector from, Vector to, Biome biome, boolean updateBiome) Sets the biome of a region to a custom biome.
-
Field Details
-
OVERWORLD_MIN_HEIGHT
static final int OVERWORLD_MIN_HEIGHT- See Also:
-
OVERWORLD_MAX_HEIGHT
static final int OVERWORLD_MAX_HEIGHT- See Also:
-
NETHER_END_MIN_HEIGHT
static final int NETHER_END_MIN_HEIGHT- See Also:
-
NETHER_END_MAX_HEIGHT
static final int NETHER_END_MAX_HEIGHT- See Also:
-
-
Method Details
-
of
Returns a new instance of the BiomeSetter interface.- Returns:
- a new instance of the BiomeSetter interface
- Since:
- 0.0.1
-
of
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
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
Returns the RegionAccessor for the given location.- Parameters:
location- the location- Returns:
- the RegionAccessor for the location
- Since:
- 0.0.1
-
setBlockBiome
-
setBlockBiome
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
-
setChunkBiome
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
-
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
Sets the biome of a bounding box to a custom biome.- Parameters:
world- the worldboundingBox- the bounding boxbiome- the custom biome- Since:
- 0.0.1
-
setRegionBiome
-
setRegionBiome
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 locationto- the ending locationbiome- the custom biomeupdateBiome- a flag indicating whether to update the biome of the region immediately- Since:
- 0.0.1
-
setRegionBiome
-
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 worldfrom- the starting vectorto- the ending vectorbiome- the custom biomeupdateBiome- 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
-