TrainCarts/MobEntering [zh-tw]

From BergerHealer Wiki
Revision as of 07:24, 13 October 2025 by Halogly (talk | contribs) (Created page with "除了''生物''以外,还有一个更为详细的'''生物类别列表''',可以为其设置特定的碰撞选项。名称'''区分大小写''',并且'''必须小写'''。在较新版本的TC中,复数单词也同样有效。")
Jump to navigation Jump to search
Other languages:

讓生物進入礦車

生物遵循碰撞屬性規則進入礦車。默認禁用生物自動進入礦車。要為剛生成的礦車或被選中的礦車開啟此功能,需要運行命令:

/train collision mobs enter

該命令只會更改當前選定的列車。

默認行為

如果你想讓玩家放置的所有礦車都能讓生物自動進入,你有兩種選擇。你可以讓玩家放置的是原版礦車,但代價是礦車不能鏈接編組,更多信息請參閱原版礦車

或者,你可以更改新放置礦車的默認配置。你需要編輯plugins/Train_Carts/DefaultTrainProperties.yml

這裡有幾個配置板塊:

  • default為普通玩家。
  • admin為擁有train.properties.admin權限的玩家(OP默認擁有)。
  • spawner適用於在spawner控制牌上使用m/s/p/等語法。不適用於已生成且已保存的列車。

對於你想要編輯的類別,要找到以下位置:

collision: {}

或者,如果已經存在一些配置,它可能看起來像這樣:

  collision:
    players: DEFAULT
    misc: PUSH
    train: LINK
    block: DEFAULT

然後修改(或添加)為:

  collision:
    animal: ENTER
    monster: ENTER

原有的其他配置可以保留。

在一些更高版本上,也可以這樣改(或添加):

  collision:
    mobs: ENTER

最後,重啟服務器,或者運行命令:

/train globalconfig reload --defaulttrainproperties

其他選項

除了生物以外,還有一個更為詳細的生物類別列表,可以為其設置特定的碰撞選項。名稱區分大小寫,並且必須小寫。在較新版本的TC中,複數單詞也同樣有效。

YAML Key Category Description
pet Tameable animals
jockey Jockey mounts that can spawn for monsters, like spiders, skeletons, zombie and chickens
killer_bunny Rabbit mob, that is a killer bunny specialized type
npc Mobs that are NPCs, like villagers
animal Passive animal mobs including mobs like the bat and squid
monster Hostile monster mobs, including slimes, golems and phantom
passive Passive mobs. Large overlap with animal
neutral Neutral mobs that can become aggressive. For example, enderman.
hostile Hostile mobs that cannot be passive. For example, creeper.
tameable Same as pet. Tameable animals
utility Utility mobs. Only Golems.
boss Boss mobs. Ender dragon, wither.