Difference between revisions of "TrainCarts/Lag/zh-cn"

From BergerHealer Wiki
Jump to navigation Jump to search
(Created page with "Minecraft 不太擅长渲染复杂的体素模型。如果你的服务器上装载有复杂模型的自定义资源包,这可能会导致客户端的帧数下降。请在上...")
(Created page with "== 大量的车厢 ==")
Line 8: Line 8:
 
Minecraft 不太擅长渲染复杂的体素模型。如果你的服务器上装载有复杂模型的自定义资源包,这可能会导致客户端的帧数下降。请在上传自定义资源包到服务器之前尽可能优化和查看模型。JSON 文件的大小是最强有力的指标。
 
Minecraft 不太擅长渲染复杂的体素模型。如果你的服务器上装载有复杂模型的自定义资源包,这可能会导致客户端的帧数下降。请在上传自定义资源包到服务器之前尽可能优化和查看模型。JSON 文件的大小是最强有力的指标。
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
== 大量的车厢 ==
== Large carts ==
 
</div>
 
  
 
<div lang="en" dir="ltr" class="mw-content-ltr">
 
<div lang="en" dir="ltr" class="mw-content-ltr">

Revision as of 00:44, 10 October 2024

Other languages:
English • ‎中文(中国大陆)‎

« 返回

使用 TC 插件时可能在某些功能上会造成服务器或客户端的卡顿。该页面会展示卡顿的原因细节,以及如何去缓解卡顿。

复杂的 3D 模型

Minecraft 不太擅长渲染复杂的体素模型。如果你的服务器上装载有复杂模型的自定义资源包,这可能会导致客户端的帧数下降。请在上传自定义资源包到服务器之前尽可能优化和查看模型。JSON 文件的大小是最强有力的指标。

大量的车厢

When configuring the physical attributes of a cart in the attachment editor, the cart size can be set very large. This changes the bounding box of the entity itself, which may result in worsened TPS on the server. The main cause is the block collision calculations the server does. To prevent this problem, disable block collisions entirely

Turns off block collisions, trains will fall through the ground
Command: /train collision block cancel
Permission: train.property.collision


Large wait distance

The wait distance property can be set for a train, so that it will keep distance to trains up ahead. This does require tracking all the rails the full distance in front of the train. Setting this distance too high can therefore result in worsened TPS on the server.

Keep chunks loaded

Trains can keep chunks loaded, but too many loaded chunks may also hurt server performance. They consume RAM, which might cause an out-of-memory situation. They may also contain entities or redstone contraptions that all contribute to a worsened TPS. As trains move, they load and unload chunks continuously, which might also cause problems.

Generally a single train keeping chunks loaded is not a big deal, it's no different from a player moving from one location to another. But having hundreds of them on far reaches of the server could cause problems.

Limit the number of trains

You can edit plugins/Train_Carts/config.yml to limit how many individual TrainCarts Minecart entities can exist per world. This prevents an out of control spawner sign or player abuse lagging the server to a halt.

# Limits of the amount of carts on the server
cartLimits:
  # Maximum number of TrainCarts minecarts allowed per world
  # If there are more than this number, no more minecarts can be placed/spawned
  # A value of -1 disables this limit (default)
  maxCartsPerWorld: -1
</div>

  <div lang="en" dir="ltr" class="mw-content-ltr">
# Whether to include unloaded trains/carts in the maxCartsPerWorld limit
  countUnloaded: false
</div>

  <div lang="en" dir="ltr" class="mw-content-ltr">
# Maximum number of carts that can be joined together in a train
  # Linking does not happen when it would exceed this limit,
  # and trains longer than this cannot be spawned
  # A value of -1 disables this limit, allowing any length (default)
  maxCartsPerTrain: -1

Saved Train Spawn Limits

Besides a global limit, it is possible to configure a spawn limit per saved train. After having saved a train with /train save name, you can configure a spawn limit with /savedtrain name spawnlimit <limit>.

Spawn signs and train chests configured with the train name will stop spawning trains when this limit is reached. This is particularly useful with auto-spawning spawn signs that populate a train network, combined with setting destroyAllOnShutdown to true in config.yml.