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

Various fixes (Beta 1.8-1.8.9 spawnpoint bug, preprocesser #define guards, etc.) #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nel-S
Copy link
Contributor

@Nel-S Nel-S commented Dec 11, 2024

  • The Beta 1.8 - 1.8.9 spawn algorithms use (0,0) as their first-stage fallback point, not (8,8). (This can be seen by comparing the actual spawnpoint of 21945110879732238 in 1.8.9 Large Biomes (via its level.dat file) vs. 1.9 Large Biomes).
  • If keywords like STRUCT or UNREACHABLE were already defined (for example, if a user's program includes a different library with that keyword followed by this one, which happened to me), the compilation encounters an error. I added #ifdef/#undef guards to undefine the previous keywords and so avoid the collisions.
  • The Readme's description of spawnpoints was outdated, so I fixed those. I also clarified the makefile instructions, added some basic instructions for Windows users, and added information about make clean for anyone who encounters errors (like I did the first time I tried to use that).

These, meanwhile, will probably be the most controversial changes:

  • The /locate command returns strongholds' coordinates with a chunk offset of (0,0), not (4,4). Since that's how most players will likely retrieve/check that structure's coordinates, I changed their returned positions to model that.
  • The 1.18+ spawn algorithm also begins checking for topsolid non-waterlogged blocks from chunk offset (0,0), so on average a (0,0) chunk offset is a far better estimate of the world's most likely spawnpoint compared to an (8,8) chunk offset. Therefore I also changed that for estimateSpawn(); getSpawn() is not affected by the change.

- Beta 1.8 - 1.8.9 spawn first-stage fallback is (0,0), not (8,8)
- Added #ifdef/#undef guards in case any #define'd keywords were already previously defined (an error occurs otherwise)
- change stronghold chunk offset to (0,0) to match /locate coordinate
- change 1.18+ second-stage spawn estimate chunk offset to (0,0) to match most likely coordinate pick
- update Readme spawn description for 1.18+, plus add basic Windows instructions and makefile debugging information
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.

1 participant