Package net.minecraftforge.common.world
Class ForgeChunkManager.TicketTracker<T extends java.lang.Comparable<? super T>>
- java.lang.Object
-
- net.minecraftforge.common.world.ForgeChunkManager.TicketTracker<T>
-
- Enclosing class:
- ForgeChunkManager
public static class ForgeChunkManager.TicketTracker<T extends java.lang.Comparable<? super T>> extends java.lang.Object
Helper class to manage tracking and handling loaded tickets.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<ForgeChunkManager.TicketOwner<T>,it.unimi.dsi.fastutil.longs.LongSet>
chunks
private java.util.Map<ForgeChunkManager.TicketOwner<T>,it.unimi.dsi.fastutil.longs.LongSet>
tickingChunks
-
Constructor Summary
Constructors Constructor Description TicketTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
add(ForgeChunkManager.TicketOwner<T> owner, long chunk, boolean ticking)
java.util.Map<ForgeChunkManager.TicketOwner<T>,it.unimi.dsi.fastutil.longs.LongSet>
getChunks()
Gets an unmodifiable view of the tracked chunks.private java.util.Map<ForgeChunkManager.TicketOwner<T>,it.unimi.dsi.fastutil.longs.LongSet>
getTickets(boolean ticking)
java.util.Map<ForgeChunkManager.TicketOwner<T>,it.unimi.dsi.fastutil.longs.LongSet>
getTickingChunks()
Gets an unmodifiable view of the tracked fully ticking chunks.boolean
isEmpty()
Checks if this tracker is empty.private boolean
remove(ForgeChunkManager.TicketOwner<T> owner, long chunk, boolean ticking)
-
-
-
Field Detail
-
chunks
private final java.util.Map<ForgeChunkManager.TicketOwner<T extends java.lang.Comparable<? super T>>,it.unimi.dsi.fastutil.longs.LongSet> chunks
-
tickingChunks
private final java.util.Map<ForgeChunkManager.TicketOwner<T extends java.lang.Comparable<? super T>>,it.unimi.dsi.fastutil.longs.LongSet> tickingChunks
-
-
Method Detail
-
getChunks
public java.util.Map<ForgeChunkManager.TicketOwner<T>,it.unimi.dsi.fastutil.longs.LongSet> getChunks()
Gets an unmodifiable view of the tracked chunks.
-
getTickingChunks
public java.util.Map<ForgeChunkManager.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 java.util.Map<ForgeChunkManager.TicketOwner<T>,it.unimi.dsi.fastutil.longs.LongSet> getTickets(boolean ticking)
-
remove
private boolean remove(ForgeChunkManager.TicketOwner<T> owner, long chunk, boolean ticking)
- Returns:
true
if the state changed.
-
add
private boolean add(ForgeChunkManager.TicketOwner<T> owner, long chunk, boolean ticking)
- Returns:
true
if the state changed.
-
-