Class ChunkWatchEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.ChunkWatchEvent
- Direct Known Subclasses:
ChunkWatchEvent.Sent
,ChunkWatchEvent.UnWatch
,ChunkWatchEvent.Watch
public abstract class ChunkWatchEvent
extends net.neoforged.bus.api.Event
This event is fired whenever a chunk has a watch-related action.
The player's level may not be the same as the level of the chunk when the player is teleporting to another dimension.
This event is not cancellable and does not
.
invalid reference
have a result
This event is fired on the main Forge event bus only on the logical server.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This event is fired whenever a chunk being watched by aServerPlayer
is transmitted to their client (seePlayerChunkSender.sendNextChunks(ServerPlayer)
).static class
This event is fired whenever aServerPlayer
stops watching a chunk.static class
This event is fired whenever aServerPlayer
begins watching a chunk and the chunk is queued up for sending to the client (seeChunkMap.markChunkPendingToSend(ServerPlayer, LevelChunk)
). -
Field Summary
Modifier and TypeFieldDescriptionprivate final ServerLevel
private final ServerPlayer
private final ChunkPos
-
Constructor Summary
-
Method Summary
-
Field Details
-
level
-
player
-
pos
-
-
Constructor Details
-
ChunkWatchEvent
-
-
Method Details
-
getPlayer
Returns the server player involved with the watch action.- Returns:
- the server player involved with the watch action
-
getPos
Returns the chunk position this watch event is affecting.- Returns:
- the chunk position this watch event is affecting
-
getLevel
Returns the server level containing the chunk.- Returns:
- the server level containing the chunk
-