Class GlobalBiomeSetter

java.lang.Object
dev.wyck.renderer.setter.GlobalBiomeSetter
All Implemented Interfaces:
AbstractBiomeRenderer, BiomeSetter

@NullMarked @AsOf("1.0.1") public class GlobalBiomeSetter extends Object implements BiomeSetter
This class provides methods to set the biome of blocks, chunks, and regions in the game.
Since:
0.0.1
  • Constructor Details

    • GlobalBiomeSetter

      public GlobalBiomeSetter()
    • GlobalBiomeSetter

      public GlobalBiomeSetter(Plugin plugin)
    • GlobalBiomeSetter

      public GlobalBiomeSetter(BiomeUpdater biomeUpdater)
  • Method Details

    • setBlockBiome

      public void setBlockBiome(Block block, Biome biome)
      Description copied from interface: BiomeSetter
      Sets the biome of a block to a custom biome.
      Specified by:
      setBlockBiome in interface BiomeSetter
      Parameters:
      block - the block
      biome - the custom biome
    • setBlockBiome

      public void setBlockBiome(Block block, Biome biome, boolean updateBiome)
      Description copied from interface: BiomeSetter
      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.
      Specified by:
      setBlockBiome in interface BiomeSetter
      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

      public void setChunkBiome(Chunk chunk, Biome biome)
      Description copied from interface: BiomeSetter
      Sets the biome of a chunk to a custom biome.
      Specified by:
      setChunkBiome in interface BiomeSetter
      Parameters:
      chunk - the chunk
      biome - the custom biome
    • setChunkBiome

      public void setChunkBiome(Chunk chunk, Biome biome, boolean updateBiome)
      Description copied from interface: BiomeSetter
      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.
      Specified by:
      setChunkBiome in interface BiomeSetter
      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

      public void setChunkBiome(Chunk chunk, int minHeight, int maxHeight, Biome biome)
      Description copied from interface: BiomeSetter
      Sets the biome of a chunk to a custom biome within a height range.
      Specified by:
      setChunkBiome in interface BiomeSetter
      Parameters:
      chunk - the chunk
      minHeight - the minimum height
      maxHeight - the maximum height
      biome - the custom biome
    • setChunkBiome

      public void setChunkBiome(Chunk chunk, int minHeight, int maxHeight, Biome abstractBiome, boolean updateBiome)
      Description copied from interface: BiomeSetter
      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.
      Specified by:
      setChunkBiome in interface BiomeSetter
      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

      public void setBoundingBoxBiome(World world, BoundingBox boundingBox, Biome biome)
      Description copied from interface: BiomeSetter
      Sets the biome of a bounding box to a custom biome.
      Specified by:
      setBoundingBoxBiome in interface BiomeSetter
      Parameters:
      world - the world
      boundingBox - the bounding box
      biome - the custom biome
    • setRegionBiome

      public void setRegionBiome(Location from, Location to, Biome biome)
      Description copied from interface: BiomeSetter
      Sets the biome of a region to a custom biome.
      Specified by:
      setRegionBiome in interface BiomeSetter
      Parameters:
      from - the starting location
      to - the ending location
      biome - the custom biome
    • setRegionBiome

      public void setRegionBiome(Location from, Location to, Biome biome, boolean updateBiome)
      Description copied from interface: BiomeSetter
      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.
      Specified by:
      setRegionBiome in interface BiomeSetter
      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
    • setRegionBiome

      public void setRegionBiome(World world, Vector from, Vector to, Biome biome)
      Description copied from interface: BiomeSetter
      Sets the biome of a region to a custom biome.
      Specified by:
      setRegionBiome in interface BiomeSetter
      Parameters:
      world - the world
      from - the starting vector
      to - the ending vector
      biome - the custom biome
    • setRegionBiome

      public void setRegionBiome(World world, Vector from, Vector to, Biome biome, boolean updateBiome)
      Description copied from interface: BiomeSetter
      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.
      Specified by:
      setRegionBiome in interface BiomeSetter
      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
    • setRegionBiome

      public void setRegionBiome(World world, Location from, Location to, Biome abstractBiome, boolean updateBiome)
      Description copied from interface: BiomeSetter
      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.
      Specified by:
      setRegionBiome in interface BiomeSetter
      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.