Class GlobalBiomeSetter
java.lang.Object
dev.wyck.renderer.setter.GlobalBiomeSetter
- All Implemented Interfaces:
AbstractBiomeRenderer, BiomeSetter
This class provides methods to set the biome of blocks, chunks, and regions in the game.
- Since:
- 0.0.1
-
Field Summary
Fields inherited from interface BiomeSetter
NETHER_END_MAX_HEIGHT, NETHER_END_MIN_HEIGHT, OVERWORLD_MAX_HEIGHT, OVERWORLD_MIN_HEIGHT -
Constructor Summary
ConstructorsConstructorDescriptionGlobalBiomeSetter(BiomeUpdater biomeUpdater) GlobalBiomeSetter(Plugin plugin) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetBlockBiome(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 abstractBiome, 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 abstractBiome, 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.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiomeSetter
getRegionAccessor
-
Constructor Details
-
GlobalBiomeSetter
public GlobalBiomeSetter() -
GlobalBiomeSetter
-
GlobalBiomeSetter
-
-
Method Details
-
setBlockBiome
Description copied from interface:BiomeSetterSets the biome of a block to a custom biome.- Specified by:
setBlockBiomein interfaceBiomeSetter- Parameters:
block- the blockbiome- the custom biome
-
setBlockBiome
Description copied from interface:BiomeSetterSets 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.- Specified by:
setBlockBiomein interfaceBiomeSetter- 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.
-
setChunkBiome
Description copied from interface:BiomeSetterSets the biome of a chunk to a custom biome.- Specified by:
setChunkBiomein interfaceBiomeSetter- Parameters:
chunk- the chunkbiome- the custom biome
-
setChunkBiome
Description copied from interface:BiomeSetterSets 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.- Specified by:
setChunkBiomein interfaceBiomeSetter- 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.
-
setChunkBiome
Description copied from interface:BiomeSetterSets the biome of a chunk to a custom biome within a height range.- Specified by:
setChunkBiomein interfaceBiomeSetter- Parameters:
chunk- the chunkminHeight- the minimum heightmaxHeight- the maximum heightbiome- the custom biome
-
setChunkBiome
public void setChunkBiome(Chunk chunk, int minHeight, int maxHeight, Biome abstractBiome, boolean updateBiome) Description copied from interface:BiomeSetterSets 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.- Specified by:
setChunkBiomein interfaceBiomeSetter- 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.abstractBiome- The custom biome to set for the chunk.updateBiome- A flag indicating whether to update the biome of the chunk immediately.
-
setBoundingBoxBiome
Description copied from interface:BiomeSetterSets the biome of a bounding box to a custom biome.- Specified by:
setBoundingBoxBiomein interfaceBiomeSetter- Parameters:
world- the worldboundingBox- the bounding boxbiome- the custom biome
-
setRegionBiome
Description copied from interface:BiomeSetterSets the biome of a region to a custom biome.- Specified by:
setRegionBiomein interfaceBiomeSetter- Parameters:
from- the starting locationto- the ending locationbiome- the custom biome
-
setRegionBiome
Description copied from interface:BiomeSetterSets 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.- Specified by:
setRegionBiomein interfaceBiomeSetter- Parameters:
from- the starting locationto- the ending locationbiome- the custom biomeupdateBiome- a flag indicating whether to update the biome of the region immediately
-
setRegionBiome
Description copied from interface:BiomeSetterSets the biome of a region to a custom biome.- Specified by:
setRegionBiomein interfaceBiomeSetter- Parameters:
world- the worldfrom- the starting vectorto- the ending vectorbiome- the custom biome
-
setRegionBiome
Description copied from interface:BiomeSetterSets 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.- Specified by:
setRegionBiomein interfaceBiomeSetter- 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
-
setRegionBiome
public void setRegionBiome(World world, Location from, Location to, Biome abstractBiome, boolean updateBiome) Description copied from interface:BiomeSetterSets 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.- Specified by:
setRegionBiomein interfaceBiomeSetter- Parameters:
world- The world in which the region is located.from- The starting vector of the region.to- The ending vector of the region.abstractBiome- The custom biome to set for the region.updateBiome- A flag indicating whether to update the biome of the region immediately.
-