C# Class ManicDigger.MapTools.PopulationTools

Provides helper methods that assist with populating chunks with stuff such as caves, trees, flowers etc. This class cannot be inherited.
Datei anzeigen Open project: henon/manic_digger

Public Methods

Method Description
IsTree ( int x, int y, int height, int seed, int chunkSize, int waterLevel, int treeDensity ) : bool

Returns whether or not there is a tree at the given location.

MakeCaves ( IMapStorage map, int x, int y, int z, int chunksize, Random rnd, bool enableCaves, int gravelLength, int goldOreLength, int ironOreLength, int coalOreLength, int dirtOreLength, int silverOreLength ) : void

Creates caves all over the chunk.

MakeCuboid ( IMapStorage map, int x, int y, int z, int sizex, int sizey, int sizez, int blocktype, int allowin, double chance, Random rnd ) : void

Creates a cuboid at the given location and using the given sizes.

MakeFlowers ( IMapStorage map, int cx, int cy, int cz, int chunksize, Random rnd ) : void

Creates some flowers all over the chunk.

MakeSmallTrees ( IMapStorage map, int cx, int cy, int cz, int chunksize, Random rnd, int count ) : void
MakeTreeType1 ( IMapStorage map, int x, int y, int z, Random rnd ) : void

Creates a tree of type #1 at the given location.

MakeTreeType2 ( IMapStorage map, int x, int y, int z, Random rnd ) : void

Creates a tree of type #2 at the given location.

MakeTreeType3 ( IMapStorage map, int x, int y, int z, Random rnd ) : void

Creates a tree of type #3 at the given location.

MakeTrees ( IMapStorage map, int x, int y, int z, int chunksize, Random rnd ) : void

Creates some trees all over the chunk.

Private Methods

Method Description
SetBlock ( IMapStorage map, int x, int y, int z, int blocktype ) : void

Sets a block at the given position.

SetBlockIfEmpty ( IMapStorage map, int x, int y, int z, int blocktype ) : void

Sets a block at the given position, but only if it is empty.

Method Details

IsTree() public static method

Returns whether or not there is a tree at the given location.
public static IsTree ( int x, int y, int height, int seed, int chunkSize, int waterLevel, int treeDensity ) : bool
x int
y int
height int
seed int
chunkSize int
waterLevel int
treeDensity int
return bool

MakeCaves() public static method

Creates caves all over the chunk.
public static MakeCaves ( IMapStorage map, int x, int y, int z, int chunksize, Random rnd, bool enableCaves, int gravelLength, int goldOreLength, int ironOreLength, int coalOreLength, int dirtOreLength, int silverOreLength ) : void
map IMapStorage
x int
y int
z int
chunksize int
rnd System.Random
enableCaves bool
gravelLength int
goldOreLength int
ironOreLength int
coalOreLength int
dirtOreLength int
silverOreLength int
return void

MakeCuboid() public static method

Creates a cuboid at the given location and using the given sizes.
public static MakeCuboid ( IMapStorage map, int x, int y, int z, int sizex, int sizey, int sizez, int blocktype, int allowin, double chance, Random rnd ) : void
map IMapStorage
x int
y int
z int
sizex int
sizey int
sizez int
blocktype int
allowin int
chance double
rnd System.Random
return void

MakeFlowers() public static method

Creates some flowers all over the chunk.
public static MakeFlowers ( IMapStorage map, int cx, int cy, int cz, int chunksize, Random rnd ) : void
map IMapStorage
cx int
cy int
cz int
chunksize int
rnd System.Random
return void

MakeSmallTrees() public static method

public static MakeSmallTrees ( IMapStorage map, int cx, int cy, int cz, int chunksize, Random rnd, int count ) : void
map IMapStorage
cx int
cy int
cz int
chunksize int
rnd System.Random
count int
return void

MakeTreeType1() public static method

Creates a tree of type #1 at the given location.
public static MakeTreeType1 ( IMapStorage map, int x, int y, int z, Random rnd ) : void
map IMapStorage
x int
y int
z int
rnd System.Random
return void

MakeTreeType2() public static method

Creates a tree of type #2 at the given location.
public static MakeTreeType2 ( IMapStorage map, int x, int y, int z, Random rnd ) : void
map IMapStorage
x int
y int
z int
rnd System.Random
return void

MakeTreeType3() public static method

Creates a tree of type #3 at the given location.
public static MakeTreeType3 ( IMapStorage map, int x, int y, int z, Random rnd ) : void
map IMapStorage
x int
y int
z int
rnd System.Random
return void

MakeTrees() public static method

Creates some trees all over the chunk.
public static MakeTrees ( IMapStorage map, int x, int y, int z, int chunksize, Random rnd ) : void
map IMapStorage
x int
y int
z int
chunksize int
rnd System.Random
return void