-
Bug
-
Resolution: Fixed
-
1.16.3, 1.16.4 Pre-release 1
-
Community Consensus
-
Performance
-
Important
When a drowned entity is loaded the default navigation (the one created by Mob::createNavigation) is added to ServerLevel::navigations because Drowned::updateSwimming was not executed yet.
But when it's unloaded the one returned by Mob::getNavigation() is removed from ServerLevel::navigations, which by that point is either Drowned::waterNavigation or Drowned::groundNavigation.
This causes a memory leak because the navigation added to the Set is not one of those two and thus not ever removed. As a result Level::setBlock performance degrades.
For reference our server accumulated approximately 8,100 navigations in the Set with only 38 drowned actually being alive in approximately 26h.