Skip to content

Commit

Permalink
pass checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
CursedFlames committed Jun 12, 2021
1 parent 514840b commit c9575d5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Stream;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import io.github.opencubicchunks.cubicchunks.CubicChunks;
import io.github.opencubicchunks.cubicchunks.chunk.CubeMapGetter;
import io.github.opencubicchunks.cubicchunks.chunk.IBigCube;
import io.github.opencubicchunks.cubicchunks.chunk.ImposterChunkPos;
Expand Down Expand Up @@ -201,7 +199,7 @@ public void setCubeStatus(ChunkStatus newStatus) {
BlockGetter chunk = chunkSource.getChunkForLighting(chunkPos.x, chunkPos.z);

// the load order guarantees the chunk being present
assert(chunk != null);
assert (chunk != null);

((CubeMapGetter) chunk).getCubeMap().markLoaded(this.cubePos.getY());

Expand Down Expand Up @@ -280,7 +278,7 @@ public LightSurfaceTrackerSection[] getLightHeightmaps() {
BlockGetter chunk = chunkSource.getChunkForLighting(chunkPos.x, chunkPos.z);

// the load order guarantees the chunk being present
assert(chunk != null);
assert (chunk != null);

LightSurfaceTrackerWrapper lightHeightmap = ((LightHeightmapGetter) chunk).getServerLightHeightmap();

Expand Down Expand Up @@ -335,23 +333,23 @@ public LightSurfaceTrackerSection[] getLightHeightmaps() {
*/
private SurfaceTrackerSection[] getHeightmapSections(Heightmap.Types type) {

SurfaceTrackerSection[] sections = heightmaps.get(type);
SurfaceTrackerSection[] surfaceTrackerSections = heightmaps.get(type);

if (sections == null) {
sections = new SurfaceTrackerSection[IBigCube.DIAMETER_IN_SECTIONS * IBigCube.DIAMETER_IN_SECTIONS];
if (surfaceTrackerSections == null) {
surfaceTrackerSections = new SurfaceTrackerSection[IBigCube.DIAMETER_IN_SECTIONS * IBigCube.DIAMETER_IN_SECTIONS];

for (int dx = 0; dx < IBigCube.DIAMETER_IN_SECTIONS; dx++) {
for (int dz = 0; dz < IBigCube.DIAMETER_IN_SECTIONS; dz++) {
int idx = dx + dz * IBigCube.DIAMETER_IN_SECTIONS;
sections[idx] = new SurfaceTrackerSection(0, cubePos.getY(), null, this, type);
sections[idx].loadCube(dx, dz, this, true);
surfaceTrackerSections[idx] = new SurfaceTrackerSection(0, cubePos.getY(), null, this, type);
surfaceTrackerSections[idx].loadCube(dx, dz, this, true);
}
}

heightmaps.put(type, sections);
heightmaps.put(type, surfaceTrackerSections);
}

return sections;
return surfaceTrackerSections;
}

private void primeHeightMaps(EnumSet<Heightmap.Types> toInitialize) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void doSkyLightForCube(IBigCube cube) {
BlockGetter chunk = this.chunkSource.getChunkForLighting(chunkPos.x + sectionX, chunkPos.z + sectionZ);

// the load order guarantees the chunk being present
assert(chunk != null);
assert (chunk != null);

CubeMap cubeMap = ((CubeMapGetter) chunk).getCubeMap();
if (!cubeMap.isLoaded(cubePos.getY())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.minecraft.core.SectionPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.LightLayer;
import net.minecraft.world.level.chunk.ChunkSource;
import net.minecraft.world.level.chunk.ChunkStatus;
import net.minecraft.world.level.chunk.DataLayer;
import net.minecraft.world.level.chunk.LightChunkGetter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import javax.annotation.Nullable;

import com.mojang.datafixers.util.Pair;
import io.github.opencubicchunks.cubicchunks.chunk.CubeMapGetter;
import io.github.opencubicchunks.cubicchunks.CubicChunks;
import io.github.opencubicchunks.cubicchunks.chunk.CubeMapGetter;
import io.github.opencubicchunks.cubicchunks.chunk.IBigCube;
import io.github.opencubicchunks.cubicchunks.chunk.IChunkManager;
import io.github.opencubicchunks.cubicchunks.chunk.ticket.CubeTaskPriorityQueueSorter;
Expand Down

0 comments on commit c9575d5

Please sign in to comment.