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

Revise spawn conditions to be more similar to vanilla's. Fix minor bugs. #7

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

gniftygnome
Copy link
Contributor

@gniftygnome gniftygnome commented Dec 24, 2024

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.

  • Avoid using MobEntity.canMobSpawn() which is rarely used by vanilla
  • Review spawning conditions and rates and attempt to improve them
  • Use c:swamp in 1.20; c:is_swamp was not widely used yet (should change back in 1.21)
  • Prevent Capuchins from randomly targeting Capuchins and Players
  • Fix a rare crash in FlightWalkMoveControl

- Avoid using MobEntity.canMobSpawn() which is rarely used by vanilla
- Review spawning conditions and rates and attempt to improve them
- Use `c:swamp` in 1.20; `c:is_swamp` was not widely used yet
- Prevent Capuchins from randomly targeting Capuchins and Players
- Fix a rare crash in FlightWalkMoveControl
@cybercat5555 cybercat5555 merged commit 038c263 into cybercat5555:1.20 Dec 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants