Fix LGTM Issues
@@ -132,13 +132,15 @@ private void checkForUnload() {
invalidateChunks.drainTo(positions, UNLOAD_PER_FRAME);
for (Vector3i pos : positions) {
Chunk removed = chunkCache.remove(pos);
- if (removed != null && !removed.isReady()) {
+ if (removed != null) {
+ if (!removed.isReady()) {
sortedReadyChunks.remove(removed);
}
worldEntity.send(new BeforeChunkUnload(pos));
removed.dispose();
}
}
+ }
private void makeChunksAvailable() {
List<Chunk> newReadyChunks = Lists.newArrayList();
