Class GlowStructure
java.lang.Object
net.glowstone.generator.structures.GlowStructure
- All Implemented Interfaces:
TerrainObject
- Direct Known Subclasses:
GlowTemple
-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
The x coordinate of the root chunk.protected final int
The z coordinate of the root chunk.protected final org.bukkit.World
The world to generate the structure in.Fields inherited from interface net.glowstone.generator.objects.TerrainObject
PLANT_TYPES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPiece
(GlowStructurePiece piece) boolean
generate
(Random random, int x, int z, BlockStateDelegate delegate) Attempts to generate this structure.boolean
Generates this feature.int
The x coordinate of the root chunk.int
The z coordinate of the root chunk.Returns an immutable list of this structure's pieces.org.bukkit.World
getWorld()
The world to generate the structure in.boolean
isDirty()
void
setBoundingBox
(StructureBoundingBox boundingBox) void
setDirty
(boolean dirty) abstract boolean
shouldGenerate
(Random random) void
Updates the structure's bounding box to be the bounding box of the union of its pieces.
-
Field Details
-
world
protected final org.bukkit.World worldThe world to generate the structure in. -
chunkX
protected final int chunkXThe x coordinate of the root chunk. -
chunkZ
protected final int chunkZThe z coordinate of the root chunk.
-
-
Constructor Details
-
GlowStructure
public GlowStructure(org.bukkit.World world, int chunkX, int chunkZ)
-
-
Method Details
-
addPiece
-
getPieces
Returns an immutable list of this structure's pieces.- Returns:
- an immutable list of this structure's pieces
-
shouldGenerate
-
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 interfaceTerrainObject
- Parameters:
world
- the world to generate inrandom
- the PRNG that will choose the size and a few details of the shapesourceX
- the base X coordinatesourceY
- the base Y coordinatesourceZ
- the base Z coordinate- Returns:
- true if successfully generated
-
generate
Attempts to generate this structure.- Parameters:
random
- the PRNG to usex
- the x coordinate for the structure's root blockz
- the z coordinate for the structure's root blockdelegate
- theBlockStateDelegate
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
-
setBoundingBox
-
isDirty
public boolean isDirty() -
setDirty
public void setDirty(boolean dirty)
-