TrainCarts/Lag [ja]

From BergerHealer Wiki
Jump to navigation Jump to search
(Created page with "アタッチメントエディタでは、トロッコのサイズをとても大きなものにすることができます。これはトロッコ本体の当たり判定も大きくしますが、これは同時に、特に、ブロックとの衝突などの処理でサーバーに小さくない負担をかけるかもしれません。これを防止するためには、ブロック衝突をオフにすることも検討...")
(Created page with "<code>DefaulTrainProperties.yml</code>もしくは<code>SavedTrainProperties.yml</code>の設定を編集することで、プレイヤーが設置するトロッコの初期設定や、すべてのトロッコのプロパティを変更できます。")
Line 11: Line 11:
{{Command|train collision block cancel|Turns off block collisions, trains will fall through the ground|train.property.collision}}
{{Command|train collision block cancel|Turns off block collisions, trains will fall through the ground|train.property.collision}}


<div lang="en" dir="ltr" class="mw-content-ltr">
<code>DefaulTrainProperties.yml</code>もしくは<code>SavedTrainProperties.yml</code>の設定を編集することで、プレイヤーが設置するトロッコの初期設定や、すべてのトロッコのプロパティを変更できます。
You can also configure this for all minecarts placed by Players, or for existing saved trains. Edit this for the train configuration in <code>DefaulTrainProperties.yml</code> or <code>SavedTrainProperties.yml</code>:
</div>
<pre>
<pre>
trainname:
trainname:

Revision as of 01:55, 18 June 2026

Other languages:

プラグインの使い方によっては、サーバーやクライアントにラグを引き起こすかも知れません。このページでは、そのラグの原因や、対処法を説明します。

複雑な3Dモデル

Minecraftというゲームは、複雑なボクセルモデルを描画するのに向いた作りにはなっていません。もしサーバーのリソースパックで複雑なモデルを使っているなら、クライアントのFPS値を減少させる可能性もあります。実際のサーバーにリソースパックを適用する前に、一度試してラグを確認するようにしてください。モデルのJSONファイルサイズも有効な指標になります。

長い列車

アタッチメントエディタでは、トロッコのサイズをとても大きなものにすることができます。これはトロッコ本体の当たり判定も大きくしますが、これは同時に、特に、ブロックとの衝突などの処理でサーバーに小さくない負担をかけるかもしれません。これを防止するためには、ブロック衝突をオフにすることも検討してください。

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


DefaulTrainProperties.ymlもしくはSavedTrainProperties.ymlの設定を編集することで、プレイヤーが設置するトロッコの初期設定や、すべてのトロッコのプロパティを変更できます。

trainname:
  collision:
    block: CANCEL

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.

You can improve performance by lowering the radius trains keep loaded, or configuring it to not simulate the chunks they keep loaded. This should be done for when the train is traveling long distances.

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.