[ci skip] Add more patch identifying comments

This commit is contained in:
Nassim Jahnke
2024-01-13 18:34:33 +01:00
parent 2307466a54
commit 393db207da
20 changed files with 137 additions and 132 deletions

View File

@@ -29,13 +29,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
}
+ // Spigot start // Paper start - moved after stat fetching for player state file.
+ // Paper start - Moved after stat fetching for player state file
+ // Moves the loading after vanilla loading, so it overrides the values.
+ // Disables saving any forced stats, so it stays at the same value (without enabling disableStatSaving)
+ // Fixes stat initialization to not cause a NullPointerException
+ // Spigot start
+ for ( Map.Entry<ResourceLocation, Integer> entry : org.spigotmc.SpigotConfig.forcedStats.entrySet() )
+ {
+ Stat<ResourceLocation> wrapper = Stats.CUSTOM.get(java.util.Objects.requireNonNull(BuiltInRegistries.CUSTOM_STAT.get(entry.getKey()))); // Paper - ensured by SpigotConfig#stats
+ this.stats.put( wrapper, entry.getValue().intValue() );
+ }
+ // Spigot end // Paper end - moved after stat fetching for player state file.
+ // Spigot end
+ // Paper end - Moved after stat fetching for player state file
}
public void save() {