Class StarlightRelighter<SERVER_LEVEL,CHUNK_POS>
java.lang.Object
com.fastasyncworldedit.bukkit.adapter.StarlightRelighter<SERVER_LEVEL,CHUNK_POS>
- Type Parameters:
SERVER_LEVEL
- the version-specific ServerLevel typeCHUNK_POS
- the version-specific ChunkPos type
- All Implemented Interfaces:
Relighter
,AutoCloseable
public abstract class StarlightRelighter<SERVER_LEVEL,CHUNK_POS>
extends Object
implements Relighter
A base class for version-specific implementations of the starlight relighting mechanism
- Since:
- 2.8.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.fastasyncworldedit.core.extent.processor.lighting.Relighter
Relighter.SkipReason
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
StarlightRelighter
(SERVER_LEVEL serverLevel, IQueueExtent<?> queue) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addChunk
(int cx, int cz, byte[] skipReason, int bitmask) void
addLightUpdate
(int x, int y, int z) protected abstract long
asLong
(int chunkX, int chunkZ) protected abstract CompletableFuture
<?> chunkLoadFuture
(CHUNK_POS pos) protected List
<CompletableFuture<?>> chunkLoadFutures
(Set<CHUNK_POS> coords) void
clear()
void
close()
convertChunkKeysToChunkPos
(it.unimi.dsi.fastutil.longs.LongSet chunks) protected abstract CHUNK_POS
createChunkPos
(long chunkKey) void
protected void
fixLighting
(it.unimi.dsi.fastutil.longs.LongSet chunks, Runnable andThen) void
fixLightingSafe
(boolean sky) void
getLock()
protected abstract void
invokeRelight
(Set<CHUNK_POS> coords, Consumer<CHUNK_POS> chunkCallback, IntConsumer processCallback) boolean
isEmpty()
boolean
protected @NotNull IntConsumer
postProcessCallback
(Runnable andThen, Set<CHUNK_POS> coords) protected abstract void
postProcessChunks
(Set<CHUNK_POS> coords) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fastasyncworldedit.core.extent.processor.lighting.Relighter
removeAndRelight
-
Field Details
-
LOGGER
-
serverLevel
-
-
Constructor Details
-
StarlightRelighter
-
-
Method Details
-
convertChunkKeysToChunkPos
-
createChunkPos
-
asLong
protected abstract long asLong(int chunkX, int chunkZ) -
chunkLoadFuture
-
chunkLoadFutures
-
postProcessCallback
@NotNull protected @NotNull IntConsumer postProcessCallback(Runnable andThen, Set<CHUNK_POS> coords) -
invokeRelight
protected abstract void invokeRelight(Set<CHUNK_POS> coords, Consumer<CHUNK_POS> chunkCallback, IntConsumer processCallback) -
postProcessChunks
-
fixLighting
-
addChunk
public boolean addChunk(int cx, int cz, byte[] skipReason, int bitmask) -
fixLightingSafe
public void fixLightingSafe(boolean sky) - Specified by:
fixLightingSafe
in interfaceRelighter
-
addLightUpdate
public void addLightUpdate(int x, int y, int z) - Specified by:
addLightUpdate
in interfaceRelighter
-
clear
public void clear() -
removeLighting
public void removeLighting()- Specified by:
removeLighting
in interfaceRelighter
-
fixBlockLighting
public void fixBlockLighting()- Specified by:
fixBlockLighting
in interfaceRelighter
-
fixSkyLighting
public void fixSkyLighting()- Specified by:
fixSkyLighting
in interfaceRelighter
-
isEmpty
public boolean isEmpty() -
getLock
-
isFinished
public boolean isFinished()- Specified by:
isFinished
in interfaceRelighter
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-