Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.WorldGenerators.FlatWorld Class Reference
Inheritance diagram for essentials.WorldGenerators.FlatWorld:
pluginbase.Objects.World.Generators.WorldGeneratorBase pluginbase.Objects.World.Generators.IWorldGenerator pluginbase.Objects.World.Generators.IBlockGenerator

Public Member Functions

 FlatWorld (int seed, IBlockLookup BlockManager)
override IBlock GetBlock (int x, int y, int z)
 Gets the type of block at a given coordinate The main engine of the world generator More...
- Public Member Functions inherited from pluginbase.Objects.World.Generators.WorldGeneratorBase
Vector3d GetOpenPointNear (int cx, int cy, int cz, int openSize=2, int maxSearch=50)
 Search an area in the world generator for an open space near a coordinate More...
virtual Vector3d GetSpawn ()
 Default spawn point near 0,0,0 More...
virtual Vector3d GetGravity (int cx, int cy, int cz)
 Gets the direction of the gravity at a given point More...

Additional Inherited Members

- Properties inherited from pluginbase.Objects.World.Generators.WorldGeneratorBase
string Name [get]
 Get name of the generator as defined in the attribute More...

Detailed Description

Attribute: WorldGenerator("Flat", Author="Pontoon City", Description="Completely flat world")

Constructor & Destructor Documentation

essentials.WorldGenerators.FlatWorld.FlatWorld ( int  seed,
IBlockLookup  BlockManager 
18  {
19  _blockManager = BlockManager;
20  }

Member Function Documentation

override IBlock essentials.WorldGenerators.FlatWorld.GetBlock ( int  x,
int  y,
int  z 

Gets the type of block at a given coordinate The main engine of the world generator

The block.
xThe x coordinate.
yThe y coordinate.
zThe z coordinate.

Implements pluginbase.Objects.World.Generators.WorldGeneratorBase.

23  {
24  if (z < -16)
25  return _blockManager.GetBlock<Rock>();
26  if (z < -1)
27  return _blockManager.GetBlock<Dirt>();
28  if (z < 0)
29  return _blockManager.GetBlock<Grass>();
30  return _blockManager.EmptyBlock;
31  }
Definition: Grass.cs:6
Definition: Dirt.cs:8

The documentation for this class was generated from the following file: