--- a/net/minecraft/stats/ServerStatsCounter.java +++ b/net/minecraft/stats/ServerStatsCounter.java @@ -100,12 +_,6 @@ this.dirty.add(stat); } - private Set> getDirty() { - Set> set = Sets.newHashSet(this.dirty); - this.dirty.clear(); - return set; - } - public void parseLocal(DataFixer fixerUpper, String json) { try { try (JsonReader jsonReader = new JsonReader(new StringReader(json))) { @@ -144,9 +_,11 @@ public void sendStats(ServerPlayer player) { Object2IntMap> map = new Object2IntOpenHashMap<>(); - for (Stat stat : this.getDirty()) { + for (Stat stat : this.dirty) { // DivineMC - Skip dirty stats copy when requesting player stats map.put(stat, this.getValue(stat)); } + + this.dirty.clear(); // DivineMC - Skip dirty stats copy when requesting player stats player.connection.send(new ClientboundAwardStatsPacket(map)); }