Difference between revisions of "TrainCarts/MobEntering"
Bergerkiller (talk | contribs) (Created page with "« Go back == Putting mobs into Minecarts == Mobs are put into minecarts through a collision property rule. By...") |
Bergerkiller (talk | contribs) |
||
Line 2: | Line 2: | ||
== Putting mobs into Minecarts == | == Putting mobs into Minecarts == | ||
− | Mobs are put into minecarts through a [[TrainCarts/Signs/Property|collision property]] rule. By default this automatic entering is disabled. To turn it on for a train you have just spawned or selected, run the following command: | + | Mobs are put into minecarts through a [[TrainCarts/Signs/Property|collision property]] rule. By default this automatic entering is disabled. To turn it on for a train you have just spawned or [[TrainCarts/Commands#Selecting|selected]], run the following command: |
+ | <pre>/train collision mobs enter</pre> | ||
+ | |||
+ | This command only changes this for the one train you had selected. | ||
+ | |||
+ | == Default Behavior == | ||
+ | If you want all minecarts placed by players to put mobs into them by default, you have two options. You can make it so that minecarts placed by players are vanilla Minecraft minecarts, but that means they cannot be trains. [[TrainCarts/VanillaMinecarts|See this page for more information about that.]] | ||
+ | |||
+ | Alternatively, you can change the default setting for newly placed minecarts. To do so, edit <code>plugins/Train_Carts/DefaultTrainProperties.yml</code>. | ||
+ | |||
+ | There's multiple blocks of configurations: | ||
+ | * '''default''' is for normal players | ||
+ | * '''admin''' for players with the <code>train.properties.admin</code> permission (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: | ||
+ | <pre>collision: {}</pre> | ||
+ | Or, it might look like this if it already had some configurations: | ||
+ | <pre> collision: | ||
+ | players: DEFAULT | ||
+ | misc: PUSH | ||
+ | train: LINK | ||
+ | block: DEFAULT</pre> | ||
+ | |||
+ | And change it to: | ||
+ | <pre> | ||
+ | collision: | ||
+ | mobs: ENTER</pre> | ||
+ | </pre> | ||
+ | You can leave previous options if they existed. | ||
+ | |||
+ | Then, either restart the server, or run this command: | ||
+ | <pre>/train globalconfig reload --defaulttrainproperties</pre> |
Revision as of 16:07, 2 November 2023
Putting mobs into Minecarts
Mobs are put into minecarts through a collision property rule. By default this automatic entering is disabled. To turn it on for a train you have just spawned or selected, run the following command:
/train collision mobs enter
This command only changes this for the one train you had selected.
Default Behavior
If you want all minecarts placed by players to put mobs into them by default, you have two options. You can make it so that minecarts placed by players are vanilla Minecraft minecarts, but that means they cannot be trains. See this page for more information about that.
Alternatively, you can change the default setting for newly placed minecarts. To do so, edit plugins/Train_Carts/DefaultTrainProperties.yml
.
There's multiple blocks of configurations:
- default is for normal players
- admin for players with the
train.properties.admin
permission (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: mobs: ENTER
You can leave previous options if they existed.
Then, either restart the server, or run this command:
/train globalconfig reload --defaulttrainproperties