Skip to content

Commit

Permalink
perf: Add logger check for array init
Browse files Browse the repository at this point in the history
  • Loading branch information
VidTu committed Mar 3, 2025
1 parent baa0e97 commit 32388fc
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ private MinecraftServerMixin() {
}, at = @At("STORE"), remap = false, require = 0, expect = 0, index = 5)
public int ksyxis_prepareLevels_spawnChunkRadius_getInt(int spawnChunkRadius) {
// Report spawnChunkRadius gamerule as 0. Also log. (**DEBUG**)
if (!KSYXIS_LOGGER.isDebugEnabled()) return 0;
KSYXIS_LOGGER.debug("Ksyxis: Reporting 0 as spawnChunkRadius gamerule instead of {} (expected 0 to 32) in MinecraftServerMixin.", new Object[]{spawnChunkRadius}); // <- Array for compat with Log4j2 2.0-beta.9 used in older MC versions.
return 0;
}
Expand Down

0 comments on commit 32388fc

Please sign in to comment.