mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-28 07:56:26 +01:00
Parallel light updates
This commit is contained in:
parent
2ed8c6e2e5
commit
c79084ce57
1 changed files with 2 additions and 6 deletions
|
@ -99,9 +99,7 @@ public class LightUpdater {
|
||||||
|
|
||||||
ImmutableBox chunkBox = GridAlignedBB.from(SectionPos.of(sectionPos));
|
ImmutableBox chunkBox = GridAlignedBB.from(SectionPos.of(sectionPos));
|
||||||
|
|
||||||
for (ILightUpdateListener listener : set) {
|
set.parallelStream().forEach(listener -> listener.onLightUpdate(provider, type, chunkBox));
|
||||||
listener.onLightUpdate(provider, type, chunkBox);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,9 +116,7 @@ public class LightUpdater {
|
||||||
|
|
||||||
set.removeIf(l -> l.status().shouldRemove());
|
set.removeIf(l -> l.status().shouldRemove());
|
||||||
|
|
||||||
for (ILightUpdateListener listener : set) {
|
set.parallelStream().forEach(listener -> listener.onLightPacket(provider, chunkX, chunkZ));
|
||||||
listener.onLightPacket(provider, chunkX, chunkZ);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long blockToSection(BlockPos pos) {
|
public static long blockToSection(BlockPos pos) {
|
||||||
|
|
Loading…
Reference in a new issue