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 SummaryFieldsModifier 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 Stringprivate final ForcedChunksSavedData
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateTicketHelper(ForcedChunksSavedData 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 SummaryModifier 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.voidremoveAllTickets(UUID owner) Removes all tickets that a given entity (UUID) was responsible for; both ticking and not ticking.voidremoveAllTickets(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.voidremoveTicket(UUID owner, long chunk, boolean ticking) Removes the ticket for the given chunk that a given entity (UUID) was responsible for.voidremoveTicket(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- 
TicketHelperprivate TicketHelper(ForcedChunksSavedData 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- 
getBlockTicketspublic 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.- API Note:
- This map is unmodifiable and does not update to reflect removed tickets so it is safe to call the remove methods while iterating it.
 
- 
getEntityTicketspublic 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.- API Note:
- This map is unmodifiable and does not update to reflect removed tickets so it is safe to call the remove methods while iterating it.
 
- 
removeAllTicketsRemoves all tickets that a given block was responsible for; both ticking and not ticking.- Parameters:
- owner- Block that was responsible.
 
- 
removeAllTicketsRemoves all tickets that a given entity (UUID) was responsible for; both ticking and not ticking.- Parameters:
- owner- Entity (UUID) that was responsible.
 
- 
removeAllTicketsprivate <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.
- 
removeTicketRemoves 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.
 
- 
removeTicketRemoves 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.
 
- 
removeTicketprivate <T extends Comparable<? super T>> void removeTicket(ForgeChunkManager.TicketTracker<T> tickets, T owner, long chunk, boolean ticking) 
 
-