Block Scans loading chunks
Raycoms opened this issue ยท 2 comments
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Create a new server
- Have a few people online
- Spark Profiler
Log output/error (if present)
Get your minecraft log and paste it here.
Expected behavior
Entities not loading chunks
Versions
- Minecraft Version: 1.18.1
- Platform (Forge/Fabric): Forge
Additional context
Basically, many of the entities do block scans to find a good positions. This might, when close to chunk borders, cause strong server lag spikes (Because it then might load a chunk).
It would make to check if the chunk is loaded first, before accessing it.
You can take a look at how minecolonies does it here: https://github.com/ldtteam/minecolonies/blob/version/1.18/src/api/java/com/minecolonies/api/util/WorldUtil.java#L66