Class TicketHelper

java.lang.Object
net.neoforged.neoforge.common.world.chunk.TicketHelper

public class TicketHelper extends Object
Class to help mods remove no longer valid tickets.
  • Field Details

  • Constructor Details

  • Method Details

    • getBlockTickets

      public Map<BlockPos,TicketSet> getBlockTickets()
      Returns all "BLOCK" tickets this controller had registered and which block positions are forcing which chunks.
      Returns:
      all "BLOCK" tickets this controller had registered and which block positions are forcing which chunks
    • getEntityTickets

      public Map<UUID,TicketSet> getEntityTickets()
      Returns all "ENTITY" tickets this controller had registered and which entity (UUID) is forcing which chunks.
      Returns:
      all "ENTITY" tickets this controller had registered and which entity (UUID) is forcing which chunks
    • removeAllTickets

      public void removeAllTickets(BlockPos owner)
      Removes all tickets that a given block was responsible for; both ticking and not ticking.
      Parameters:
      owner - Block that was responsible.
    • removeAllTickets

      public void removeAllTickets(UUID owner)
      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(ForcedChunkManager.TicketTracker<T> tickets, T owner)
      Removes all tickets that a given owner was responsible for; both ticking and not ticking.
    • removeTicket

      public void removeTicket(BlockPos owner, long chunk, boolean ticking)
      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

      public void removeTicket(UUID owner, long chunk, boolean ticking)
      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(ForcedChunkManager.TicketTracker<T> tickets, T owner, long chunk, boolean ticking)