Cuberite
A lightweight, fast and extensible game server for Minecraft
|
This class populates generated chunks with packs of biome-dependant animals Animals: cows, sheep, pigs, mooshrooms, squid, horses, wolves, ocelots. More...
#include <FinishGen.h>
Public Member Functions | |
cFinishGenPassiveMobs (int a_Seed, cIniFile &a_IniFile, eDimension a_Dimension) | |
Public Member Functions inherited from cFinishGen | |
virtual | ~cFinishGen () |
Protected Member Functions | |
virtual void | GenFinish (cChunkDesc &a_ChunkDesc) override |
eMonsterType | GetRandomMob (cChunkDesc &a_ChunkDesc) |
Picks a random animal from biome-dependant list for a random position in the chunk. More... | |
bool | TrySpawnAnimals (cChunkDesc &a_ChunkDesc, int x, int y, int z, eMonsterType AnimalToSpawn) |
Returns false if an animal cannot spawn at given coords, else adds it to the chunk's entity list and returns true. More... | |
Protected Attributes | |
int | m_AnimalProbability |
Chance, [0..100], that an animal pack will be generated in a chunk. More... | |
cNoise | m_Noise |
The noise used as the source of randomness. More... | |
This class populates generated chunks with packs of biome-dependant animals Animals: cows, sheep, pigs, mooshrooms, squid, horses, wolves, ocelots.
Definition at line 429 of file FinishGen.h.
cFinishGenPassiveMobs::cFinishGenPassiveMobs | ( | int | a_Seed, |
cIniFile & | a_IniFile, | ||
eDimension | a_Dimension | ||
) |
Definition at line 1571 of file FinishGen.cpp.
|
overrideprotectedvirtual |
Implements cFinishGen.
Definition at line 1608 of file FinishGen.cpp.
|
protected |
Picks a random animal from biome-dependant list for a random position in the chunk.
Returns the chosen mob type, or mtInvalid if no mob chosen.
Definition at line 1702 of file FinishGen.cpp.
|
protected |
Returns false if an animal cannot spawn at given coords, else adds it to the chunk's entity list and returns true.
Definition at line 1648 of file FinishGen.cpp.
|
protected |
Chance, [0..100], that an animal pack will be generated in a chunk.
Definition at line 442 of file FinishGen.h.
|
protected |
The noise used as the source of randomness.
Definition at line 439 of file FinishGen.h.