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 Details

  • Constructor Details

  • Method Details

    • deactivateTicketsOnClosing

      public void deactivateTicketsOnClosing()
    • inheritDeactivated

      private void inheritDeactivated(ForcedChunkManager.TicketOwner<T> owner, TicketSet ticketSet)
    • activateAllDeactivatedSources

      private void activateAllDeactivatedSources()
    • inheritSources

      private void inheritSources(@Nullable @Nullable Holder<TicketType> ticketType, it.unimi.dsi.fastutil.longs.Long2ObjectMap<Set<ForcedChunkManager.TicketOwner<T>>> fromSource, it.unimi.dsi.fastutil.longs.Long2ObjectMap<Set<ForcedChunkManager.TicketOwner<T>>> toSource)
    • hasNoDeactivatedTickets

      public boolean hasNoDeactivatedTickets()
      Checks if this tracker has no deactivated tickets.
      Returns:
      true if there are no tickets that are currently deactivated.
    • isEmpty

      public boolean isEmpty()
      Checks if this tracker is empty.
      Returns:
      true if there are no chunks or chunks with forced natural spawning being tracked.
    • getSourcesLoading

      private it.unimi.dsi.fastutil.longs.Long2ObjectMap<Set<ForcedChunkManager.TicketOwner<T>>> getSourcesLoading(boolean forceNaturalSpawning, boolean targetDeactivated)
    • makeTicket

      private Ticket makeTicket(boolean forceNaturalSpawning)
    • remove

      public boolean remove(ForcedChunkManager.TicketOwner<T> owner, long chunk, boolean forceNaturalSpawning, boolean targetDeactivated)
      Returns:
      true if the state changed.
    • add

      private boolean add(ForcedChunkManager.TicketOwner<T> owner, long chunk, boolean forceNaturalSpawning)
      Returns:
      true if the state changed.