Class GlowStructure

java.lang.Object
net.glowstone.generator.structures.GlowStructure
All Implemented Interfaces:
TerrainObject
Direct Known Subclasses:
GlowTemple

public abstract class GlowStructure extends Object implements TerrainObject
  • Field Details

    • world

      protected final org.bukkit.World world
      The world to generate the structure in.
    • chunkX

      protected final int chunkX
      The x coordinate of the root chunk.
    • chunkZ

      protected final int chunkZ
      The z coordinate of the root chunk.
  • Constructor Details

    • GlowStructure

      public GlowStructure(org.bukkit.World world, int chunkX, int chunkZ)
  • Method Details

    • addPiece

      public void addPiece(GlowStructurePiece piece)
    • getPieces

      public List<GlowStructurePiece> getPieces()
      Returns an immutable list of this structure's pieces.
      Returns:
      an immutable list of this structure's pieces
    • shouldGenerate

      public abstract boolean shouldGenerate(Random random)
    • wrapAllPieces

      public void wrapAllPieces()
      Updates the structure's bounding box to be the bounding box of the union of its pieces.
    • generate

      public boolean generate(org.bukkit.World world, Random random, int sourceX, int sourceY, int sourceZ)
      Description copied from interface: TerrainObject
      Generates this feature.
      Specified by:
      generate in interface TerrainObject
      Parameters:
      world - the world to generate in
      random - the PRNG that will choose the size and a few details of the shape
      sourceX - the base X coordinate
      sourceY - the base Y coordinate
      sourceZ - the base Z coordinate
      Returns:
      true if successfully generated
    • generate

      public boolean generate(Random random, int x, int z, BlockStateDelegate delegate)
      Attempts to generate this structure.
      Parameters:
      random - the PRNG to use
      x - the x coordinate for the structure's root block
      z - the z coordinate for the structure's root block
      delegate - the BlockStateDelegate that will check and update blocks
      Returns:
      whether the structure was successfully generated
    • getWorld

      public org.bukkit.World getWorld()
      The world to generate the structure in.
    • getChunkX

      public int getChunkX()
      The x coordinate of the root chunk.
    • getChunkZ

      public int getChunkZ()
      The z coordinate of the root chunk.
    • getBoundingBox

      public StructureBoundingBox getBoundingBox()
    • setBoundingBox

      public void setBoundingBox(StructureBoundingBox boundingBox)
    • isDirty

      public boolean isDirty()
    • setDirty

      public void setDirty(boolean dirty)