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

Add a terrain finisher that populates chunks with animals #1595

Closed
madmaxoft opened this issue Nov 14, 2014 · 3 comments · Fixed by #1642
Closed

Add a terrain finisher that populates chunks with animals #1595

madmaxoft opened this issue Nov 14, 2014 · 3 comments · Fixed by #1642

Comments

@madmaxoft
Copy link
Member

Create a new cTerrainFinisherGen descendant that populates the top of the generated chunks with animals. The animals should be biome-dependant, should spawn only in a (configurable) percentage of chunks and should spawn in pack of multiples.

Use a simple random relative-coord generator for the pack's center inside the chunk, and random offsets for individual animals in the pack, setting each animal's height to the top of the heightmap.

@p-mcgowan
Copy link
Contributor

I'm trying to implement this in src/Generator/FinishGen and I am having trouble getting the world to spawn in mobs. I can post progress so far, but I'm wondering if you have any thoughts to guide me in the right direction. It would be much appreciated

@madmaxoft
Copy link
Member Author

You should make a finisher that adds entities to the cChunkDesc's list of entities, nothing more. If that doesn't make the animals spawn, it's a bug elsewhere and will need to get addressed.

@p-mcgowan
Copy link
Contributor

awesome, that's quite helpful. Thanks for the feedback.

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

Successfully merging a pull request may close this issue.

2 participants