Class NMSRelighter
java.lang.Object
com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter
- All Implemented Interfaces:
Relighter
,AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.fastasyncworldedit.core.extent.processor.lighting.Relighter
Relighter.SkipReason
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNMSRelighter
(IQueueExtent<IQueueChunk> queue) NMSRelighter
(IQueueExtent<IQueueChunk> queue, RelightMode relightMode) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addChunk
(int cx, int cz, byte[] fix, int bitmask) Add a chunk to be relit whenRelighter.removeLighting()
etc are called.void
addLightUpdate
(int x, int y, int z) Add a block to be relit.void
clear()
Clear all chunks and blocks to be relit.void
close()
void
fill
(byte[] mask, ChunkHolder<?> iChunk, int y, byte reason) void
Fix block light values in all chunks added to relighter.void
fixLightingSafe
(boolean sky) Safely? Fix block lighting.void
Fix sky light values in all chunks added to relighter.void
flush()
getLock()
boolean
isEmpty()
Are there any block or chunk added to be relit.boolean
Returns true if the Relighter has been flushedvoid
removeAndRelight
(boolean sky) Remove lighting and then relight safely.void
Remove all block and sky light values (set to 0 light) in all chunks added to relighter.void
void
smoothSkyLight
(com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter.RelightSkyEntry chunk, int y, boolean direction) void
updateBlockLight
(Map<Long, long[][][]> map)
-
Field Details
-
mutableBlockPos
-
-
Constructor Details
-
NMSRelighter
-
NMSRelighter
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:Relighter
Are there any block or chunk added to be relit. -
getLock
-
isFinished
public boolean isFinished()Description copied from interface:Relighter
Returns true if the Relighter has been flushed- Specified by:
isFinished
in interfaceRelighter
- Returns:
- true if finished
-
removeAndRelight
public void removeAndRelight(boolean sky) Description copied from interface:Relighter
Remove lighting and then relight safely.- Specified by:
removeAndRelight
in interfaceRelighter
- Parameters:
sky
- whether to also relight sky light values
-
addLightUpdate
public void addLightUpdate(int x, int y, int z) Description copied from interface:Relighter
Add a block to be relit.- Specified by:
addLightUpdate
in interfaceRelighter
- Parameters:
x
- block xy
- block yz
- block z
-
clear
public void clear()Description copied from interface:Relighter
Clear all chunks and blocks to be relit. -
addChunk
public boolean addChunk(int cx, int cz, byte[] fix, int bitmask) Description copied from interface:Relighter
Add a chunk to be relit whenRelighter.removeLighting()
etc are called.- Specified by:
addChunk
in interfaceRelighter
- Parameters:
cx
- chunk xcz
- chunk zfix
- byte array ofRelighter.SkipReason
for each chunksection in the chunk. Use case? No idea.bitmask
- Initial bitmask of the chunk (if being edited beforehand)- Returns:
- Was the chunk added
-
removeLighting
public void removeLighting()Description copied from interface:Relighter
Remove all block and sky light values (set to 0 light) in all chunks added to relighter.- Specified by:
removeLighting
in interfaceRelighter
-
updateBlockLight
-
fixLightingSafe
public void fixLightingSafe(boolean sky) Description copied from interface:Relighter
Safely? Fix block lighting.- Specified by:
fixLightingSafe
in interfaceRelighter
- Parameters:
sky
- whether to also relight sky light values
-
fixBlockLighting
public void fixBlockLighting()Description copied from interface:Relighter
Fix block light values in all chunks added to relighter.- Specified by:
fixBlockLighting
in interfaceRelighter
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
flush
public void flush() -
sendChunks
public void sendChunks() -
fixSkyLighting
public void fixSkyLighting()Description copied from interface:Relighter
Fix sky light values in all chunks added to relighter.- Specified by:
fixSkyLighting
in interfaceRelighter
-
fill
-
smoothSkyLight
public void smoothSkyLight(com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter.RelightSkyEntry chunk, int y, boolean direction)
-