Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import it.unimi.dsi.fastutil.ints.IntIterator;
import it.unimi.dsi.fastutil.ints.IntList;
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSet;
import it.unimi.dsi.fastutil.longs.LongIterator;
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
import it.unimi.dsi.fastutil.longs.LongSet;
Expand Down Expand Up @@ -246,11 +245,14 @@ public void invalidate() {
super.invalidate();
}

// reuse set to avoid heavy allocation
private final IntOpenHashSet checked = new IntOpenHashSet();

public void lightArea() {
final Block breatheableAirID = GCBlocks.breatheableAir;
final Block brightAir = GCBlocks.brightAir;
final Block brightBreatheableAir = GCBlocks.brightBreatheableAir;
final IntSet checked = new IntOpenHashSet();
this.checked.clear();
final int baseX = this.xCoord, baseY = this.yCoord, baseZ = this.zCoord;

IntList currentLayer = new IntArrayList();
Expand Down