9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00
Files
DivineMC/divinemc-server/minecraft-patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch
Artem Ostrasev 109c57a637 1.21.6 (#25)
* start 1.21.6 update

* change workflow

* apply some patches

* set experimental to true

* some compile fixes

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@5d3463aa Updated Upstream (Paper)

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@5d3463aa Updated Upstream (Paper)

* remove data converter for 1.21.6; move clumps to unapplied

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

* Update upstream

* Update upstream

* update to 1.21.6-pre4

* update patches

* fix compile

* set readme version to 1.21.6

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@439f15db Updated Upstream (Paper)
PurpurMC/Purpur@46a28b93 [ci/skip] update version in README
2025-06-18 17:36:28 +03:00

29 lines
994 B
Diff

--- a/net/minecraft/stats/ServerStatsCounter.java
+++ b/net/minecraft/stats/ServerStatsCounter.java
@@ -98,12 +_,6 @@
this.dirty.add(stat);
}
- private Set<Stat<?>> getDirty() {
- Set<Stat<?>> set = Sets.newHashSet(this.dirty);
- this.dirty.clear();
- return set;
- }
-
public void parseLocal(DataFixer fixerUpper, String json) {
try {
JsonElement jsonElement = StrictJsonParser.parse(json);
@@ -139,9 +_,11 @@
public void sendStats(ServerPlayer player) {
Object2IntMap<Stat<?>> 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));
}