public abstract class GlowStructure extends Object implements TerrainObject
Modifier and Type | Field and Description |
---|---|
protected int |
chunkX
The x coordinate of the root chunk.
|
protected int |
chunkZ
The z coordinate of the root chunk.
|
protected org.bukkit.World |
world
The world to generate the structure in.
|
PLANT_TYPES
Constructor and Description |
---|
GlowStructure(org.bukkit.World world,
int chunkX,
int chunkZ) |
Modifier and Type | Method and Description |
---|---|
void |
addPiece(GlowStructurePiece piece) |
boolean |
generate(Random random,
int x,
int z,
BlockStateDelegate delegate)
Attempts to generate this structure.
|
boolean |
generate(org.bukkit.World world,
Random random,
int sourceX,
int sourceY,
int sourceZ)
Generates this feature.
|
StructureBoundingBox |
getBoundingBox() |
int |
getChunkX()
The x coordinate of the root chunk.
|
int |
getChunkZ()
The z coordinate of the root chunk.
|
List<GlowStructurePiece> |
getPieces()
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 |
wrapAllPieces()
Updates the structure's bounding box to be the bounding box of the union of its pieces.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
killPlantAbove
protected final org.bukkit.World world
protected final int chunkX
protected final int chunkZ
public GlowStructure(org.bukkit.World world, int chunkX, int chunkZ)
public void addPiece(GlowStructurePiece piece)
public List<GlowStructurePiece> getPieces()
public abstract boolean shouldGenerate(Random random)
public void wrapAllPieces()
public boolean generate(org.bukkit.World world, Random random, int sourceX, int sourceY, int sourceZ)
TerrainObject
generate
in interface TerrainObject
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 coordinatepublic boolean generate(Random random, int x, int z, BlockStateDelegate delegate)
random
- the PRNG to usex
- the x coordinate for the structure's root blockz
- the z coordinate for the structure's root blockdelegate
- the BlockStateDelegate
that will check and update blockspublic org.bukkit.World getWorld()
public int getChunkX()
public int getChunkZ()
public StructureBoundingBox getBoundingBox()
public void setBoundingBox(StructureBoundingBox boundingBox)
public boolean isDirty()
public void setDirty(boolean dirty)
Copyright © 2021. All rights reserved.