chraft/c-raft — Issue #128: Biome class or GetBiomeForChunk or Chunk.BiomeType
Author: spazzarama
Created: 2011-10-30 06:34:43+00:00
State: open

The mob/creature spawner will ask a Biome for a list of which monsters, creatures and water creatures can be spawned in that Biome.

This can be done in a couple of ways:

1) IChunkGenerator implements a "GetBiomeForChunk(x,z)" and the logic is then hard coded somewhere (not flexible)
2) Explicitly implement a Biome class for each type, and detaching the BIOME_TYPE from the generator and storing with the chunk. This class can then be responsible for returning this type of information, as well as providing an easy way to override this functionality.

Other areas that will benefit from this are logic that controls the growth of mushrooms...