Large Unused Attribute Push

This commit is contained in:
Kam committed 2025-02-24 16:08:22 -05:00
1 parent 4faa851078
commit 5818060656
13 files changed
+553

No files matched your search

@@ -0,0 +1,21 @@
package noppes.npcs.attribute;
import net.minecraft.server.MinecraftServer;
import net.minecraft.entity.player.EntityPlayer;
/**
* Tick handler that runs every tick and, every 10 ticks, checks all players for equipment changes.
*/
public class PlayerAttributeTickHandler {
private int tickCount = 0;
public void onTick() {
tickCount++;
if (tickCount % 10 == 0) {
for (Object o : MinecraftServer.getServer().getConfigurationManager().playerEntityList) {
EntityPlayer player = (EntityPlayer) o;
PlayerAttributeManager.getTracker(player.getUniqueID()).updateIfChanged(player);
}
}
}
}