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
FieldsModifier and TypeFieldDescriptionprivate Map<BlockPos,com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet,it.unimi.dsi.fastutil.longs.LongSet>>private Map<UUID,com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet,it.unimi.dsi.fastutil.longs.LongSet>>private Stringprivate ForcedChunksSavedData -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTicketHelper(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 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.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
-
TicketHelper
private 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
-
getBlockTickets
public Map<BlockPos,com.mojang.datafixers.util.Pair<it.unimi.dsi.fastutil.longs.LongSet,it.unimi.dsi.fastutil.longs.LongSet>> getBlockTickets()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,it.unimi.dsi.fastutil.longs.LongSet>> getEntityTickets()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)
-