Skip to content

Commit bf47737

Browse files
committed
Clarify thread semantics of ChunkEvent.Load
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
1 parent 881e58f commit bf47737

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/spongepowered/api/event/world/chunk/ChunkEvent.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.spongepowered.api.event.Cancellable;
2929
import org.spongepowered.api.event.Event;
3030
import org.spongepowered.api.util.annotation.eventgen.NoFactoryMethod;
31+
import org.spongepowered.api.world.World;
3132
import org.spongepowered.api.world.chunk.Chunk;
3233
import org.spongepowered.api.world.chunk.WorldChunk;
3334
import org.spongepowered.api.world.server.ServerWorld;
@@ -125,7 +126,11 @@ interface Generated extends WorldScoped {
125126
}
126127

127128
/**
128-
* Called when a {@link WorldChunk chunk} is done loading.
129+
* Called when a {@link WorldChunk chunk} is loaded. This can be called
130+
* outside the {@link World#engine() main} {@link Thread}. It is NOT safe
131+
* to perform modifications to the {@link World} or via
132+
* {@link org.spongepowered.api.world.server.ServerLocation} as this could
133+
* result in a deadlock.
129134
*/
130135
interface Load extends WorldScoped {
131136

0 commit comments

Comments
 (0)