/Lag
Saihou-Heiki (talk | contribs) (Created page with "== チャンクロード ==") |
Saihou-Heiki (talk | contribs) (Created page with "== 長すぎるウェイトディスタンス ==") |
||
| Line 18: | Line 18: | ||
</pre> | </pre> | ||
== 長すぎるウェイトディスタンス == | |||
= | |||
[[Special:MyLanguage/TrainCarts/Signs/Property#Wait_Property|waitdistanceプロパティ]]は、前方の列車との間で保つ距離を設定できます。これは前方のレールをずっと確認するという処理を伴うので、値が大きすぎるとサーバーに大きな負荷をかけるかもしれません。 | [[Special:MyLanguage/TrainCarts/Signs/Property#Wait_Property|waitdistanceプロパティ]]は、前方の列車との間で保つ距離を設定できます。これは前方のレールをずっと確認するという処理を伴うので、値が大きすぎるとサーバーに大きな負荷をかけるかもしれません。 | ||
Revision as of 02:02, 18 June 2026
プラグインの使い方によっては、サーバーやクライアントにラグを引き起こすかも知れません。このページでは、そのラグの原因や、対処法を説明します。
複雑な3Dモデル
Minecraftというゲームは、複雑なボクセルモデルを描画するのに向いた作りにはなっていません。もしサーバーのリソースパックで複雑なモデルを使っているなら、クライアントのFPS値を減少させる可能性もあります。実際のサーバーにリソースパックを適用する前に、一度試してラグを確認するようにしてください。モデルのJSONファイルサイズも有効な指標になります。
長い列車
アタッチメントエディタでは、トロッコのサイズをとても大きなものにすることができます。これはトロッコ本体の当たり判定も大きくしますが、これは同時に、特に、ブロックとの衝突などの処理でサーバーに小さくない負担をかけるかもしれません。これを防止するためには、ブロック衝突をオフにすることも検討してください。
| Command: | /train collision block cancel |
|---|---|
| Permission: | train.property.collision |
DefaulTrainProperties.ymlもしくはSavedTrainProperties.ymlの設定を編集することで、プレイヤーが設置するトロッコの初期設定や、すべてのトロッコのプロパティを変更できます。
trainname:
collision:
block: CANCEL
長すぎるウェイトディスタンス
waitdistanceプロパティは、前方の列車との間で保つ距離を設定できます。これは前方のレールをずっと確認するという処理を伴うので、値が大きすぎるとサーバーに大きな負荷をかけるかもしれません。
チャンクロード
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.