Class ForcedChunkManager.TicketTracker<T extends Comparable<? super T>>
java.lang.Object
net.neoforged.neoforge.common.world.chunk.ForcedChunkManager.TicketTracker<T>
- Enclosing class:
ForcedChunkManager
public static class ForcedChunkManager.TicketTracker<T extends Comparable<? super T>>
extends Object
Helper class to manage tracking and handling loaded tickets.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Map
<ForcedChunkManager.TicketOwner<T>, it.unimi.dsi.fastutil.longs.LongSet> (package private) final Map
<ForcedChunkManager.TicketOwner<T>, it.unimi.dsi.fastutil.longs.LongSet> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
add
(ForcedChunkManager.TicketOwner<T> owner, long chunk, boolean ticking) Map
<ForcedChunkManager.TicketOwner<T>, it.unimi.dsi.fastutil.longs.LongSet> Gets an unmodifiable view of the tracked chunks.private Map
<ForcedChunkManager.TicketOwner<T>, it.unimi.dsi.fastutil.longs.LongSet> getTickets
(boolean ticking) Map
<ForcedChunkManager.TicketOwner<T>, it.unimi.dsi.fastutil.longs.LongSet> Gets an unmodifiable view of the tracked fully ticking chunks.boolean
isEmpty()
Checks if this tracker is empty.boolean
remove
(ForcedChunkManager.TicketOwner<T> owner, long chunk, boolean ticking)
-
Field Details
-
chunks
final Map<ForcedChunkManager.TicketOwner<T extends Comparable<? super T>>,it.unimi.dsi.fastutil.longs.LongSet> chunks -
tickingChunks
final Map<ForcedChunkManager.TicketOwner<T extends Comparable<? super T>>,it.unimi.dsi.fastutil.longs.LongSet> tickingChunks
-
-
Constructor Details
-
TicketTracker
public TicketTracker()
-
-
Method Details
-
getChunks
Gets an unmodifiable view of the tracked chunks. -
getTickingChunks
public Map<ForcedChunkManager.TicketOwner<T>,it.unimi.dsi.fastutil.longs.LongSet> getTickingChunks()Gets an unmodifiable view of the tracked fully ticking chunks. -
isEmpty
public boolean isEmpty()Checks if this tracker is empty.- Returns:
true
if there are no chunks or ticking chunks being tracked.
-
getTickets
private Map<ForcedChunkManager.TicketOwner<T>,it.unimi.dsi.fastutil.longs.LongSet> getTickets(boolean ticking) -
remove
- Returns:
true
if the state changed.
-
add
- Returns:
true
if the state changed.
-