Package net.minecraftforge.common.world
Class ForgeChunkManager.TicketHelper
java.lang.Object
net.minecraftforge.common.world.ForgeChunkManager.TicketHelper
- Enclosing class:
- ForgeChunkManager
Class to help mods remove no longer valid tickets.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<BlockPos,
com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, it.unimi.dsi.fastutil.longs.LongSet>> private final Map<UUID,
com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, it.unimi.dsi.fastutil.longs.LongSet>> private final String
private final ForcedChunksSaveData
-
Constructor Summary
ModifierConstructorDescriptionprivate
TicketHelper
(ForcedChunksSaveData saveData, String modId, Map<BlockPos, com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, it.unimi.dsi.fastutil.longs.LongSet>> blockTickets, Map<UUID, com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, it.unimi.dsi.fastutil.longs.LongSet>> entityTickets) -
Method Summary
Modifier and TypeMethodDescriptionMap<BlockPos,
com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, it.unimi.dsi.fastutil.longs.LongSet>> Gets all "BLOCK" tickets this mod had registered and which block positions are forcing which chunks.Map<UUID,
com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, it.unimi.dsi.fastutil.longs.LongSet>> Gets all "ENTITY" tickets this mod had registered and which entity (UUID) is forcing which chunks.void
removeAllTickets
(UUID owner) Removes all tickets that a given entity (UUID) was responsible for; both ticking and not ticking.void
removeAllTickets
(BlockPos owner) Removes all tickets that a given block was responsible for; both ticking and not ticking.private <T extends Comparable<? super T>>
voidremoveAllTickets
(ForgeChunkManager.TicketTracker<T> tickets, T owner) Removes all tickets that a given owner was responsible for; both ticking and not ticking.void
removeTicket
(UUID owner, long chunk, boolean ticking) Removes the ticket for the given chunk that a given entity (UUID) was responsible for.void
removeTicket
(BlockPos owner, long chunk, boolean ticking) Removes the ticket for the given chunk that a given block was responsible for.private <T extends Comparable<? super T>>
voidremoveTicket
(ForgeChunkManager.TicketTracker<T> tickets, T owner, long chunk, boolean ticking)
-
Field Details
-
blockTickets
-
entityTickets
-
saveData
-
modId
-
-
Constructor Details
-
TicketHelper
private TicketHelper(ForcedChunksSaveData saveData, String modId, Map<BlockPos, com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, it.unimi.dsi.fastutil.longs.LongSet>> blockTickets, Map<UUID, com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, it.unimi.dsi.fastutil.longs.LongSet>> entityTickets)
-
-
Method Details
-
getBlockTickets
public Map<BlockPos,com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, getBlockTickets()it.unimi.dsi.fastutil.longs.LongSet>> Gets all "BLOCK" tickets this mod had registered and which block positions are forcing which chunks. First element of the pair is the non-fully ticking tickets, second element is the fully ticking tickets. -
getEntityTickets
public Map<UUID,com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet, getEntityTickets()it.unimi.dsi.fastutil.longs.LongSet>> Gets all "ENTITY" tickets this mod had registered and which entity (UUID) is forcing which chunks. First element of the pair is the non-fully ticking tickets, second element is the fully ticking tickets. -
removeAllTickets
Removes all tickets that a given block was responsible for; both ticking and not ticking.- Parameters:
owner
- Block that was responsible.
-
removeAllTickets
Removes all tickets that a given entity (UUID) was responsible for; both ticking and not ticking.- Parameters:
owner
- Entity (UUID) that was responsible.
-
removeAllTickets
private <T extends Comparable<? super T>> void removeAllTickets(ForgeChunkManager.TicketTracker<T> tickets, T owner) Removes all tickets that a given owner was responsible for; both ticking and not ticking. -
removeTicket
Removes the ticket for the given chunk that a given block was responsible for.- Parameters:
owner
- Block that was responsible.chunk
- Chunk to remove ticket of.ticking
- Whether or not the ticket to remove represents a ticking set of tickets or not.
-
removeTicket
Removes the ticket for the given chunk that a given entity (UUID) was responsible for.- Parameters:
owner
- Entity (UUID) that was responsible.chunk
- Chunk to remove ticket of.ticking
- Whether or not the ticket to remove represents a ticking set of tickets or not.
-
removeTicket
private <T extends Comparable<? super T>> void removeTicket(ForgeChunkManager.TicketTracker<T> tickets, T owner, long chunk, boolean ticking)
-