-
Notifications
You must be signed in to change notification settings - Fork 15
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
add relevance check to avoid creating additional entity #27
Conversation
- clean up code - fix test cases PR: Terasology/ModuleTestingEnvironment#27
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.
Looks good to me - I'd like to see some JavaDoc for the EmptyWorldGenerator
, but this could also be done in a follow-up PR.
If you could just throw together a few words on how to use it that would be great!
if (worldProvider.isBlockRelevant(blockPos)) { | ||
return; | ||
} |
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.
Totally makes sense! 👍
import java.util.List; | ||
|
||
@RegisterWorldGenerator(id = "empty", displayName = "empty") | ||
public class EmptyWorldGenerator extends BaseFacetedWorldGenerator { |
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.
What is this supposed to be used for? Could we add a little bit of JavaDoc explaining the intended use case?
I can reproduce the failing tests locally, although it needed two runs for both to show up 🙄
As the associated error messages state that the actual state was
|
some slight optimization for dummy entity for loading chunks. creating these RelevanceRegion Entities seems to be add a usability problem to writing test cases.