Empeld
Empeld plugin documentation.
essentials.WorldGenerators.WorldEngineGenerator Class Reference

Public Member Functions

 WorldEngineGenerator (IBlockLookup blocks, IHeightMap heightmap)
 
IBlock GetBlock (int x, int y, int z)
 

Detailed Description

Attribute: Experimental("WorldEngine support under development")

Constructor & Destructor Documentation

◆ WorldEngineGenerator()

essentials.WorldGenerators.WorldEngineGenerator.WorldEngineGenerator ( IBlockLookup  blocks,
IHeightMap  heightmap 
)
17  {
18  _blocks = blocks;
19  _heightmap = heightmap;
20  }

Member Function Documentation

◆ GetBlock()

IBlock essentials.WorldGenerators.WorldEngineGenerator.GetBlock ( int  x,
int  y,
int  z 
)

Attribute: x, y

;

23  {
24  int height = _heightmap[x, y];
25  if (z <= height)
26  return _blocks.GetBlock<Grass>();
27  return _blocks.EmptyBlock;
28  }
Definition: Grass.cs:7

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