Revise spawn conditions to be more similar to vanilla's. Fix minor bugs. #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is mainly about trying to get spawns to work more consistently. Previously, most of the animals used vanilla's
MobEntity.canMobSpawn()
method, which vanilla itself only uses for special mobs like Iron Golem and Ender Dragon. I've added custom methods to the individual animals which require spawn conditions tailored to that particular animal. For example, birds can spawn on leaves, yacare should spawn near sea level, etc.There are also a few minor bug fixes, including removing the random target goal from Capuchin so it will only target for revenge. Perhaps this second goal was originally added to make testing the throw attack easier.
This PR does not address the fact Capuchins spawn rather often in Sparse Jungle and less often in Jungle, which I understand is the opposite of the desired result. One way this issue might potentially be addressed would be to add a second spawn configuration with a higher spawn rate just for the Jungle biome itself.
I have specifically attempted to restrain myself from making unnecessary code quality improvements.
c:swamp
in 1.20;c:is_swamp
was not widely used yet (should change back in 1.21)