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
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStarlightRelighter(SERVER_LEVEL serverLevel, IQueueExtent<?> queue) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddChunk(int cx, int cz, byte[] skipReason, int bitmask) voidaddLightUpdate(int x, int y, int z) protected abstract longasLong(int chunkX, int chunkZ) protected abstract CompletableFuture<?> chunkLoadFuture(CHUNK_POS pos) protected List<CompletableFuture<?>> chunkLoadFutures(Set<CHUNK_POS> coords) voidclear()voidclose()convertChunkKeysToChunkPos(it.unimi.dsi.fastutil.longs.LongSet chunks) protected abstract CHUNK_POScreateChunkPos(long chunkKey) voidprotected voidfixLighting(it.unimi.dsi.fastutil.longs.LongSet chunks, Runnable andThen) voidfixLightingSafe(boolean sky) voidgetLock()protected abstract voidinvokeRelight(Set<CHUNK_POS> coords, Consumer<CHUNK_POS> chunkCallback, IntConsumer processCallback) booleanisEmpty()booleanprotected @NotNull IntConsumerpostProcessCallback(Runnable andThen, Set<CHUNK_POS> coords) protected abstract voidpostProcessChunks(Set<CHUNK_POS> coords) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
fixLightingSafein interfaceRelighter
-
addLightUpdate
public void addLightUpdate(int x, int y, int z) - Specified by:
addLightUpdatein interfaceRelighter
-
clear
public void clear() -
removeLighting
public void removeLighting()- Specified by:
removeLightingin interfaceRelighter
-
fixBlockLighting
public void fixBlockLighting()- Specified by:
fixBlockLightingin interfaceRelighter
-
fixSkyLighting
public void fixSkyLighting()- Specified by:
fixSkyLightingin interfaceRelighter
-
isEmpty
public boolean isEmpty() -
getLock
-
isFinished
public boolean isFinished()- Specified by:
isFinishedin interfaceRelighter
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-