Class GlowStructure
java.lang.Object
net.glowstone.generator.structures.GlowStructure
- All Implemented Interfaces:
TerrainObject
- Direct Known Subclasses:
GlowTemple
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intThe x coordinate of the root chunk.protected final intThe z coordinate of the root chunk.protected final org.bukkit.WorldThe world to generate the structure in.Fields inherited from interface net.glowstone.generator.objects.TerrainObject
PLANT_TYPES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPiece(GlowStructurePiece piece) booleangenerate(Random random, int x, int z, BlockStateDelegate delegate) Attempts to generate this structure.booleanGenerates this feature.intThe x coordinate of the root chunk.intThe z coordinate of the root chunk.Returns an immutable list of this structure's pieces.org.bukkit.WorldgetWorld()The world to generate the structure in.booleanisDirty()voidsetBoundingBox(StructureBoundingBox boundingBox) voidsetDirty(boolean dirty) abstract booleanshouldGenerate(Random random) voidUpdates 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:TerrainObjectGenerates this feature.- Specified by:
generatein 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- theBlockStateDelegatethat 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)
-