You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
Did you notice that mobs load the server very much?
Vanilla servers deal with this problem like this: if there are no players next to the mob, the mob does not move until the players approach it.
Justification
This should significantly reduce the load on the server.
Alternative methods
Some check is required to see if there are any players nearby. If there are more than 0, the mob moves; if it is not, the mob does not move.
if(count($this->getViewers()) > 0){
// Perhaps this is not correct.$this->onBehaviorUpdate();
}
Additionally
The text has been translated using Google. I hope he translated everything correctly.
Perhaps these changes will cause MobSpawner-> despawnMobs () to become meaningless, which will be a very good upgrade. My players really didn’t like that mobs disappear when they go far from home. :(
The text was updated successfully, but these errors were encountered:
Description
Did you notice that mobs load the server very much?
Vanilla servers deal with this problem like this: if there are no players next to the mob, the mob does not move until the players approach it.
Justification
This should significantly reduce the load on the server.
Alternative methods
Some check is required to see if there are any players nearby. If there are more than 0, the mob moves; if it is not, the mob does not move.
Additionally
The text was updated successfully, but these errors were encountered: