-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
Use sub chunk request system (Fixes light issues, and flickering) #3460
base: master
Are you sure you want to change the base?
Conversation
Would this support packet-based light plugins? |
To an extent - anything that injects into the chunk packet would show up properly. But anything updated outside of that initial chunk packet would not show up. |
Only uses the sky light data given by Java Edition, block light is calculated automatically, don't know what packet-based light plugins do ^^ |
d70ec58
to
3d11a4c
Compare
Wait was I suppose to do something? I don't know how pull requests work lol. |
Nah, just linked your issue, but may take some time until this gets merged, as it is not really a priority. |
I don't really like the idea of more caching without a config option to turn it off, which is why I haven't moved forward with this PR for a bit. I concede that having this option around for performance is probably a good idea. Maybe we can revisit using NMS on Spigot, at least for the latest version?
|
Use sub chunk request system
3d11a4c
to
b394c13
Compare
Added some useful comments |
Could also try to improve the code redundancy a little bit, as it borrows a lot of functions from the normal chunk translator |
Memory usage could be optimized by deleting the lightData when the sub chunk is translated |
if (type == BlockEntityType.LECTERN && BlockStateValues.getLecternBookStates().get(blockState)) { | ||
// If getLecternBookStates is false, let's just treat it like a normal block entity | ||
bedrockBlockEntities.add(session.getGeyser().getWorldManager().getLecternDataAt( | ||
session, x + chunkBlockX, y, z + chunkBlockZ, true)); | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be now removed, as this particular workaround is no longer needed
Add support for the sub chunk request system, which fixes light issues, and flickering on world loading.
This also shows lighting issues which will be normally seen in Java Edition, and therefore improve parity.
But I also refactored some variable names in JavaLevelChunkWithLightTranslator to make it easier to understand and more general.
Related issue: #3425