Affects Version/s: Minecraft 18w50a
Fix Version/s: Minecraft 19w12a
Inside class ServerChunkManager (up) in a method that handles updating itself for player movement, there is piece of code like this (decompiled and remapped code):
This code iterates over ALL chunk coordinates in a box with one end at one end of player view distance before movement, and the other and the opposite end of player view area after movement. This obviously isn't going to work for far teleportation.
The way it was done in older Minecraft versions looks closer to this:
Which uses just the render distance area to determine which chunks are loaded and which chunks are to be unloaded.