Custom servers/Bukkit/TrainCarts/Physical/Collision

From Minecraft Wiki
Jump to: navigation, search

Introduction[edit]

There are a fixed amount of collision modes available to be used by trains. These modes alter how collisions with other entities, including other minecarts and trains, are dealt with. Collision modes are managed in the Train Properties. Note that for train-to-train collision usually both trains need to have similar collision modes for it to work. For linking, for example, both trains need to have the train collision mode LINK.

Constants[edit]

Currently, the following collision mode constants are available:

default Default mode, the train bounces back when colliding with the entity
cancel Cancelling the collision and goes right through the entity
push Cancels the collision and pushed the entity aside
kill Cancels the collision and kills the entity, spawning drops
killnodrops Cancels the collision and kills the entity without spawning drops
enter Cancels the collision and causes player/mob to enter the mine-cart.
link Only used by train-to-train collision: links with the other train