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

feat: fix ExecutorCompletionService workaround in ChunkProcessingPipeline #5128

Merged

Conversation

BenjaminAmos
Copy link
Contributor

@BenjaminAmos BenjaminAmos commented Jul 31, 2023

Contains

This pull request removes the work-around in ChunkProcessingPipeline where it reflects into the internals of the built-in ExecutorCompletionService class. This is no longer possible with newer Java versions and was never guarenteed to work in the first place.

Instead of making assumptions about ExecutorCompletionService, this pull request replaces the usage of the class with a new one specialised for dealing with chunks. Essentially, this makes sure that the submitted tasks are always of type PositionFuture, as several other classes in the codebase depend on the task future being an instance of that type. I believe that PositionFuture is used for certain optimisations related to the chunk load order.

This contributes to #3976.

How to test

  • Run the game
  • Create a new world
  • Run the newly created world
  • The world generation process should complete successfully
  • Chunks should load around the player in-game

@github-actions github-actions bot added Type: Bug Issues reporting and PRs fixing problems Type: Improvement Request for or addition/enhancement of a feature labels Jul 31, 2023
@skaldarnar
Copy link
Member

Tested this out with Iota, world loaded quite the same as before this change, chunks appeared around the player, even after teleporting to a completely different location that was not generated before.

@skaldarnar skaldarnar merged commit 36591e1 into develop Aug 13, 2023
15 checks passed
@skaldarnar skaldarnar deleted the feature/remove-ChunkProcessingPipeline-reflection branch August 13, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues reporting and PRs fixing problems Type: Improvement Request for or addition/enhancement of a feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants