Tick potion effects less frequently to reduce CPU load

This commit is contained in:
fullwall 2016-07-03 01:18:04 +08:00
parent a3bdaed3b3
commit b90b98bad2

View File

@ -279,7 +279,9 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
super.m();
if (npc == null)
return;
updateEffects = true;
if (updateCounter + 1 > Setting.PACKET_UPDATE_DELAY.asInt()) {
updateEffects = true;
}
tickPotionEffects();
boolean navigating = npc.getNavigator().isNavigating();