在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):YouHaveTrouble/minecraft-optimization开源软件地址(OpenSource Url):https://github.com/YouHaveTrouble/minecraft-optimization开源编程语言(OpenSource Language):开源软件介绍(OpenSource Introduction):Minecraft server optimization guideNote for users that are on vanilla, Fabric or Spigot (or anything below Paper) - go to your server.properties and change Guide for version 1.19. Some things may still apply to 1.15 - 1.18. Based on this guide and other sources (all of them are linked throughout the guide when relevant). Use the table of contents located above (next to IntroThere will never be a guide that will give you perfect results. Each server has their own needs and limits on how much you can or are willing to sacrifice. Tinkering around with the options to fine tune them to your servers needs is what it's all about. This guide only aims to help you understand what options have impact on performance and what exactly they change. If you think you found inaccurate information within this guide, you're free to open an issue or set up a pull request to correct it. PreparationsServer JARYour choice of server software can make a huge difference in performance and API possibilities. There are currently multiple viable popular server JARs, but there are also a few that you should stay away from for various reasons. Recommended top picks:
You should stay away from:
Map pregenMap pregeneration, thanks to various optimizations to chunk generation added over the years is now only useful on servers with terrible, single threaded, or limited CPUs. Though, pregeneration is commonly used to generate chunks for world-map plugins such as Pl3xMap or Dynmap. If you still want to pregen the world, you can use a plugin such as Chunky to do it. Make sure to set up a world border so your players don't generate new chunks! Note that pregenning can sometimes take hours depending on the radius you set in the pregen plugin. Keep in mind that with Paper and above your tps will not be affected by chunk loading, but the speed of loading chunks can significantly slow down when your server's cpu is overloaded. It's key to remember that the overworld, nether and the end have separate world borders that need to be set up for each world. The nether dimension is 8x smaller than the overworld (if not modified with a datapack), so if you set the size wrong your players might end up outside of the world border! Make sure to set up a vanilla world border ( ConfigurationsNetworkingserver.propertiesnetwork-compression-threshold
This allows you to set the cap for the size of a packet before the server attempts to compress it. Setting it higher can save some CPU resources at the cost of bandwidth, and setting it to -1 disables it. Setting this higher may also hurt clients with slower network connections. If your server is in a network with a proxy or on the same machine (with less than 2 ms ping), disabling this (-1) will be beneficial, since internal network speeds can usually handle the additional uncompressed traffic. purpur.ymluse-alternate-keepalive
You can enable Purpur's alternate keepalive system so players with bad connection don't get timed out as often. Has known incompatibility with TCPShield.
Chunksserver.propertiessimulation-distance
Simulation distance is distance in chunks around the player that the server will tick. Essentially the distance from the player that things will happen. This includes furnaces smelting, crops and saplings growing, etc. This is an option you want to purposefully set low, somewhere around view-distance
This is the distance in chunks that will be sent to players, similar to no-tick-view-distance from paper. The total view distance will be equal to the greatest value between spigot.ymlview-distance
This value overwrites server.properties one if not set to paper-world configurationdelay-chunk-unloads-by
This option allows you to configure how long chunks will stay loaded after a player leaves. This helps to not constantly load and unload the same chunks when a player moves back and forth. Too high values can result in way too many chunks being loaded at once. In areas that are frequently teleported to and loaded, consider keeping the area permanently loaded. This will be lighter for your server than constantly loading and unloading chunks. max-auto-save-chunks-per-tick
Lets you slow down incremental world saving by spreading the task over time even more for better average performance. You might want to set this higher than prevent-moving-into-unloaded-chunks
When enabled, prevents players from moving into unloaded chunks and causing sync loads that bog down the main thread causing lag. The probability of a player stumbling into an unloaded chunk is higher the lower your view-distance is. entity-per-chunk-save-limit
With the help of this entry you can set limits to how many entities of specified type can be saved. You should provide a limit for each projectile at least to avoid issues with massive amounts of projectiles being saved and your server crashing on loading that. You can put any entity id here, see the minecraft wiki to find IDs of entities. Please adjust the limit to your liking. Suggested value for all projectiles is around pufferfish.ymlmax-loads-per-projectile
Specifies the maximum amount of chunks a projectile can load in its lifetime. Decreasing will reduce chunk loads caused by entity projectiles, but could cause issues with tridents, enderpearls, etc. Mobsbukkit.ymlspawn-limits
The math of limiting mobs is ticks-per
This option sets how often (in ticks) the server attempts to spawn certain living entities. Water/ambient mobs do not need to spawn each tick as they don't usually get killed that quickly. As for monsters: Slightly increasing the time between spawns should not impact spawn rates even in mob farms. In most cases all of the values under this option should be higher than spigot.ymlmob-spawn-range
Allows you to reduce the range (in chunks) of where mobs will spawn around the player. Depending on your server's gamemode and its playercount you might want to reduce this value along with bukkit.yml's entity-activation-range
You can set what distance from the player an entity should be for it to tick (do stuff). Reducing those values helps performance, but may result in irresponsive mobs until the player gets really close to them. Lowering this too far can break certain mob farms; iron farms being the most common victim. entity-tracking-range
This is distance in blocks from which entities will be visible. They just won't be sent to players. If set too low this can cause mobs to seem to appear out of nowhere near a player. In the majority of cases this should be higher than your tick-inactive-villagers
This allows you to control whether villagers should be ticked outside of the activation range. This will make villagers proceed as normal and ignore the activation range. Disabling this will help performance, but might be confusing for players in certain situations. This may cause issues with iron farms and trade restocking. nerf-spawner-mobs
You can make mobs spawned by a monster spawner have no AI. Nerfed mobs will do nothing. You can make them jump while in water by changing paper-world configurationdespawn-ranges
Lets you adjust entity despawn ranges (in blocks). Lower those values to clear the mobs that are far away from the player faster. You should keep soft range around per-player-mob-spawns
This option decides if mob spawns should account for how many mobs are around target player already. You can bypass a lot of issues regarding mob spawns being inconsistent due to players creating farms that take up the entire mobcap. This will enable a more singleplayer-like spawning experience, allowing you to set lower max-entity-collisions
Overwrites option with the same name in spigot.yml. It lets you decide how many collisions one entity can process at once. Value of update-pathfinding-on-block-update
Disabling this will result in less pathfinding being done, increasing performance. In some cases this will cause mobs to appear more laggy; They will just passively update their path every 5 ticks (0.25 sec). fix-climbing-bypassing-cramming-rule
Enabling this will fix entities not being affected by cramming while climbing. This will prevent absurd amounts of mobs being stacked in small spaces even if they're climbing (spiders). armor-stands.tick
In most cases you can safely set this to armor-stands.do-collision-entity-lookups
Here you can disable armor stand collisions. This will help if you have a lot of armor stands and don't need them colliding with anything. tick-rates
This decides how often specified behaviors and sensors are being fired in ticks. pufferfish.ymldab.enabled
DAB (dynamic activation of brain) reduces the amount an entity is ticked the further away it is from players. DAB works on a gradient instead of a hard cutoff like EAR. Instead of fully ticking close entities and barely ticking far entities, DAB will reduce the amount an entity is ticked based on the result of a calculation influenced by dab.activation-dist-mod. dab.max-tick-freq
Defines the slowest amount entities farthest from players will be ticked. Increasing this value may improve the performance of entities far from view but may break farms or greatly nerf mob behavior. If enabling DAB breaks mob farms, try decreasing this value. dab.activation-dist-mod
Controls the gradient in which mobs are ticked. Decreasing this will activate DAB closer to players, improving DAB's performance gains, but will affect how entities interact with their surroundings and may break mob farms. If enabling DAB breaks mob farms, try increasing this value. enable-async-entity-tracker
Enables the asynchronous entity tracker patch made by Petal. enable-async-pathfinding
Enables the asynchronous pathfinding patch made by Petal. enable-async-mob-spawning
If asynchronous mob spawning should be enabled. For this to work, the Paper's per-player-mob-spawns setting must be enabled. This option does not actually spawn mobs asynchronous, but does offload much of the computational effort involved with spawning new mobs to a different thread. Enabling this option should not be noticeable on vanilla gameplay. enable-suffocation-optimization
This option optimises a suffocation check (the check to see if a mob is inside a block and if they should take suffocation damage), by rate limiting the check to the damage timeout. This optimisation should be impossible to notice unless you're an extremely technical player who's using tick-precise timing to kill an entity at exactly the right time by suffocation. inactive-goal-selector-throttle
Throttles the AI goal selector in entity inactive ticks, causing the inactive entities to update their goal selector every 20 ticks instead of every tick. Can improve performance by a few percent, and has minor gameplay implications. purpur.ymlzombie.aggressive-towards-villager-when-lagging
Enabling this will cause zombies to stop targeting villagers if the server is below the tps threshold set with entities-can-use-portals
This option can disable portal usage of all entities besides the player. This prevents entities from loading chunks by changing worlds which is handled on the main thread. This has the side effect of entities not being able to go through portals. villager.brain-ticks
This option allows you to set how often (in ticks) villager brains (work and poi) will tick. Going higher than villager.lobotomize.enabled
Lobotomized villagers are stripped from their AI and only restock their offers every so often. Enabling this will lobotomize villagers that are unable to pathfind to their destination. Freeing them should unlobotomize them. Miscspigot.ymlmerge-radius
This decides the distance between the items and exp orbs to be merged, reducing the amount of items ticking on the ground. Setting this too high will lead to the illus |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论