Class ChunkTicket

java.lang.Object
codechicken.chunkloader.world.ChunkTicket

public class ChunkTicket extends Object
Holds a reference to all IChunkLoaders currently loading a given chunk. Automatically allocates and frees a vanilla Ticket.

Created by covers1624 on 11/5/20.

  • Constructor Details

    • ChunkTicket

      public ChunkTicket(net.minecraft.server.level.ServerLevel level, net.minecraft.world.level.ChunkPos pos)
  • Method Details

    • addLoader

      public boolean addLoader(IChunkLoader loader)
      Adds an IChunkLoader to this ticket.
      Parameters:
      loader - The loader to add.
      Returns:
      If this chunk had no loaders previously.
    • remLoader

      public boolean remLoader(IChunkLoader loader)
      Removes an IChunkLoader from this ticket.
      Parameters:
      loader - The loadder to remove.
      Returns:
      If the chunk is now empty.
    • getLoaders

      public Set<IChunkLoader> getLoaders()