net.minecraftforge.common
Interface ForgeChunkManager.OrderedLoadingCallback

All Superinterfaces:
ForgeChunkManager.LoadingCallback
Enclosing class:
ForgeChunkManager

public static interface ForgeChunkManager.OrderedLoadingCallback
extends ForgeChunkManager.LoadingCallback

This is a special LoadingCallback that can be implemented as well as the LoadingCallback to provide access to additional behaviour. Specifically, this callback will fire prior to Forge dropping excess tickets. Tickets in the returned list are presumed ordered and excess will be truncated from the returned list. This allows the mod to control not only if they actually want a ticket but also their preferred ticket ordering.

Author:
cpw

Method Summary
 List<ForgeChunkManager.Ticket> ticketsLoaded(List<ForgeChunkManager.Ticket> tickets, World world, int maxTicketCount)
          Called back when tickets are loaded from the world to allow the mod to decide if it wants the ticket still, and prioritise overflow based on the ticket count.
 
Methods inherited from interface net.minecraftforge.common.ForgeChunkManager.LoadingCallback
ticketsLoaded
 

Method Detail

ticketsLoaded

List<ForgeChunkManager.Ticket> ticketsLoaded(List<ForgeChunkManager.Ticket> tickets,
                                             World world,
                                             int maxTicketCount)
Called back when tickets are loaded from the world to allow the mod to decide if it wants the ticket still, and prioritise overflow based on the ticket count. WARNING: You cannot force chunks in this callback, it is strictly for allowing the mod to be more selective in which tickets it wishes to preserve in an overflow situation

Parameters:
tickets - The tickets that you will want to select from. The list is immutable and cannot be manipulated directly. Copy it first.
world - The world
maxTicketCount - The maximum number of tickets that will be allowed.
Returns:
A list of the tickets this mod wishes to continue using. This list will be truncated to "maxTicketCount" size after the call returns and then offered to the other callback method