Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Biome class or GetBiomeForChunk or Chunk.BiomeType #128

Open
justinstenning opened this issue Oct 30, 2011 · 1 comment
Open

Biome class or GetBiomeForChunk or Chunk.BiomeType #128

justinstenning opened this issue Oct 30, 2011 · 1 comment

Comments

@justinstenning
Copy link
Member

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...

@creatorfromhell
Copy link

For this you can do something like: http://www.mediafire.com/?ajrwbwawg9eznuq

Then in the generation class call this Biome b = Biome.GetBiome and yeah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants