Class IndependentPlotGenerator

java.lang.Object
com.plotsquared.core.generator.IndependentPlotGenerator
Direct Known Subclasses:
HybridGen, SingleWorldGenerator

public abstract class IndependentPlotGenerator extends Object
This class allows for implementation independent world generation. - Sponge/Bukkit API Use the specify method to get the generator for that platform.
  • Constructor Details

    • IndependentPlotGenerator

      public IndependentPlotGenerator()
  • Method Details

    • getName

      public abstract String getName()
      Get the name of this generator.
      Returns:
      generator name
    • generateChunk

      public abstract void generateChunk(ScopedQueueCoordinator result, PlotArea settings)
      Use the setBlock or setBiome method of the PlotChunk result parameter to make changes. The PlotArea settings is the same one this was initialized with. The PseudoRandom random is a fast random object.
      Parameters:
      result - queue
      settings - PlotArea (settings)
    • populateChunk

      public boolean populateChunk(ScopedQueueCoordinator result, PlotArea setting)
    • getNewPlotArea

      public abstract PlotArea getNewPlotArea(String world, String id, PlotId min, PlotId max)
      Return a new PlotArea object.
      Parameters:
      world - world name
      id - (May be null) Area name
      min - Min plot id (may be null)
      max - Max plot id (may be null)
      Returns:
      new plot area
    • processAreaSetup

      public void processAreaSetup(PlotAreaBuilder builder)
      If any additional setup options need to be changed before world creation. - e.g. If setup doesn't support some standard options
      Parameters:
      builder - the area builder to modify
    • initialize

      public abstract void initialize(PlotArea area)
      It is preferred for the PlotArea object to do most of the initialization necessary.
      Parameters:
      area - area
    • specify

      public <T> GeneratorWrapper<T> specify(@NonNull String world)
      Get the generator for your specific implementation (bukkit/sponge).
      - e.g. YourIndependentGenerator.<ChunkGenerator>specify() - Would return a ChunkGenerator object
      Type Parameters:
      T - world
      Parameters:
      world - ChunkGenerator Implementation
      Returns:
      Chunk generator
    • toString

      public String toString()
      Overrides:
      toString in class Object