9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-21 07:49:18 +00:00

apply non-minecraft patches

This commit is contained in:
NONPLAYT
2025-04-21 18:23:30 +03:00
parent d5c0cd89af
commit 58ef06d87a
91 changed files with 196 additions and 200 deletions

View File

@@ -1,28 +0,0 @@
--- a/net/minecraft/stats/ServerStatsCounter.java
+++ b/net/minecraft/stats/ServerStatsCounter.java
@@ -81,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 {
try (JsonReader jsonReader = new JsonReader(new StringReader(json))) {
@@ -190,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));
}