/MobEntering
讓生物進入礦車
生物遵循碰撞屬性規則進入礦車。默認禁用生物自動進入礦車。要為剛生成的礦車或被選中的礦車開啟此功能,需要運行命令:
/train collision mobs enter
該命令只會更改當前選定的列車。
默認行為
如果你想讓玩家放置的所有礦車都能讓生物自動進入,你有兩種選擇。你可以讓玩家放置的是原版礦車,但代價是礦車不能鏈接編組,更多信息請參閱原版礦車。
或者,你可以更改新放置礦車的默認配置。你需要編輯plugins/Train_Carts/DefaultTrainProperties.yml。
There's multiple blocks of configurations:
- default is for normal players
- admin for players with the
train.properties.adminpermission (OP by default) - spawner is for trains spawned with the m/s/p/etc. syntax, on spawner signs. Does not apply to saved trains that are spawned.
For the category/categories you want to edit, find the line:
collision: {}
Or, it might look like this if it already had some configurations:
collision:
players: DEFAULT
misc: PUSH
train: LINK
block: DEFAULT
And change it to:
collision:
animal: ENTER
monster: ENTER
You can leave previous options if they existed.
On more modern versions of TrainCarts this can work too:
collision:
mobs: ENTER
Then, either restart the server, or run this command:
/train globalconfig reload --defaulttrainproperties
Other Options
Besides mobs there is a more fine-grained list of categories of mobs that can be set specific collision options for. The names are case-sensitive, and must be lower-cased. On newer versions of TrainCarts plural names work, too.
| 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. |