Rail Sensor¶
文档版本:1.21.50.25
Defines the behavior of the entity when the rail gets activated or deactivated.
架构¶
rail_sensor:
{
boolean "check_block_types" : opt
boolean "eject_on_activate" : opt
boolean "eject_on_deactivate" : opt
event_object "on_activate"
event_object "on_deactivate"
boolean "tick_command_block_on_activate" : opt
boolean "tick_command_block_on_deactivate" : opt
}
check_block_types
:boolean- If true, on tick this entity will trigger its on_deactivate behavior.
eject_on_activate
:boolean- If true, this entity will eject all of its riders when it passes over an activated rail.
eject_on_deactivate
:boolean- If true, this entity will eject all of its riders when it passes over a deactivated rail.
on_activate
:event_object- Event to call when the rail is activated.
on_deactivate
:event_object- Event to call when the rail is deactivated.
tick_command_block_on_activate
:boolean- If true, command blocks will start ticking when passing over an activated rail.
tick_command_block_on_deactivate
:boolean- If false, command blocks will stop ticking when passing over a deactivated rail.