Moved warning logic down, so that no more tickets are isues if the mod is over it's alotment. Fixes #378

This commit is contained in:
LexManos 2013-01-28 16:36:03 -08:00
parent f06e0be5e5
commit 30db577389

View file

@ -653,10 +653,13 @@ public class ForgeChunkManager
int allowedCount = ticketConstraints.containsKey(modId) ? ticketConstraints.get(modId) : defaultMaxCount; int allowedCount = ticketConstraints.containsKey(modId) ? ticketConstraints.get(modId) : defaultMaxCount;
if (tickets.get(world).get(modId).size() >= allowedCount && !warnedMods.contains(modId)) if (tickets.get(world).get(modId).size() >= allowedCount)
{ {
FMLLog.info("The mod %s has attempted to allocate a chunkloading ticket beyond it's currently allocated maximum : %d", modId, allowedCount); if (!warnedMods.contains(modId))
warnedMods.add(modId); {
FMLLog.info("The mod %s has attempted to allocate a chunkloading ticket beyond it's currently allocated maximum : %d", modId, allowedCount);
warnedMods.add(modId);
}
return null; return null;
} }
Ticket ticket = new Ticket(modId, type, world); Ticket ticket = new Ticket(modId, type, world);