Class CustomGenerator

java.lang.Object
com.welcome234.pluginsystem.CustomGenerator

public abstract class CustomGenerator extends Object
Represents a Custom world generator, which is extended and registered with a generator name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Block[][]
    generate​(Block[][] generatorData, long seed)
    Deprecated.
    Worlds are now infinite, use generateChunk instead
    Block[][]
    generateChunk​(Block[][] generatorData, long seed, int chunkX)
    Generates the custom terrain for chunks
    int
    getX​(int generatorX)
    Deprecated.
    Not needed for chunk generators
    int
    getY​(int generatorY)
    Deprecated.
    Not needed for chunk generators

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomGenerator

      public CustomGenerator()
  • Method Details

    • generate

      @Deprecated public Block[][] generate(Block[][] generatorData, long seed)
      Deprecated.
      Worlds are now infinite, use generateChunk instead
      Generates the custom world terrain

      The method must return the Blocks array, which is provided in the parameters

      Parameters:
      generatorData - Blocks array
      seed - World seed
      Returns:
      Modified Blocks array
    • generateChunk

      public Block[][] generateChunk(Block[][] generatorData, long seed, int chunkX)
      Generates the custom terrain for chunks

      The method must return the chunk block array, which is provided in the parameters

      Parameters:
      generatorData - Chunk blocks array
      seed - World seed
      chunkX - Chunk X coordinate
      Returns:
      Modified chunk blocks array
    • getX

      @Deprecated public int getX(int generatorX)
      Deprecated.
      Not needed for chunk generators
      Gets the actual X-coordinate of the Block array position
      Parameters:
      generatorX - Blocks array position X
      Returns:
      Actual world X-coordinate
    • getY

      @Deprecated public int getY(int generatorY)
      Deprecated.
      Not needed for chunk generators
      Gets the actual Y-coordinate of the Block array position
      Parameters:
      generatorY - Blocks array position Y
      Returns:
      Actual world Y-coordinate