Level Scaling Issue (no levels past level 2) (1.21.8)

Summary

I attempted to use the leveling and world scaling mechanics to make my naturally spawning mobs stronger based on distance from spawn, as described in the wiki. I tested this with a 50 health zombie that displays its health constantly in order to effectively measure whether the health was scaling or not. It did scale, but only up to level 2, which from that point it would not scale any more regardless of distance.

Steps to reproduce

Apply the same world scaling and mobs code in their respective files from the links below. https://pastebin.com/D8E8G7xE https://pastebin.com/5JpMb2uV https://pastebin.com/7WdEnfnQ

Current behavior

The mobs scale +1 level every 350 blocks from spawn, but only up to level 2, after which they no longer scale in level.

Intended correct behavior

The file should cause mobs to scale +1 level every 350 blocks from spawn.

Server log file

Provide a link to a Pastebin paste with a copy of your server's latest.log file from startup to "Done!" AND includes a player connecting.

Debug log snippet

Provide a link to a Pastebin paste with an excerpt of your latest.log file that includes debug output where you trigger the bugged behavior.

Proposed fixes

Describe what you think the issue or any potential fixes may be.

Assignee Loading
Time tracking Loading