Simplified a method that had a wrong variable name.
@@ -377,14 +377,11 @@ public void dispose() {
}
private boolean isChunkValidForRender(RenderableChunk chunk) {
- if (!chunk.isReady()) {
- return false;
- }
- boolean surroundingChunksLoaded = worldProvider.getWorldViewAround(chunk.getPosition()) == null;
- if (surroundingChunksLoaded) {
- return false;
+ return chunk.isReady() && areSurroundingChunksLoaded(chunk);
}
- return true;
+
+ private boolean areSurroundingChunksLoaded(RenderableChunk chunk) {
+ return worldProvider.getWorldViewAround(chunk.getPosition()) != null;
}
private boolean isChunkVisibleFromMainLight(RenderableChunk chunk) {
