{
  "$id": "blockception.minecraft.behavior.entities.minecraft.rail_sensor",
  "description": "Defines the behavior of the entity when the rail gets activated or deactivated.",
  "type": "object",
  "title": "Rail Sensor",
  "additionalProperties": false,
  "required": [],
  "properties": {
    "check_block_types": {
      "type": "boolean",
      "default": false,
      "description": "If true, on tick this entity will trigger its on_deactivate behavior.",
      "title": "Check Block Types"
    },
    "eject_on_activate": {
      "type": "boolean",
      "default": true,
      "description": "If true, this entity will eject all of its riders when it passes over an activated rail.",
      "title": "Eject On Activate"
    },
    "eject_on_deactivate": {
      "type": "boolean",
      "default": false,
      "description": "If true, this entity will eject all of its riders when it passes over a deactivated rail.",
      "title": "Eject On Deactivate"
    },
    "on_activate": {
      "$ref": "../types/event_object.json",
      "description": "Event to call when the rail is activated.",
      "title": "On Activate"
    },
    "on_deactivate": {
      "$ref": "../types/event_object.json",
      "description": "Event to call when the rail is deactivated.",
      "title": "On Deactivate"
    },
    "tick_command_block_on_activate": {
      "type": "boolean",
      "default": true,
      "description": "If true, command blocks will start ticking when passing over an activated rail.",
      "title": "Tick Command Block On Activate"
    },
    "tick_command_block_on_deactivate": {
      "type": "boolean",
      "default": false,
      "description": "If false, command blocks will stop ticking when passing over a deactivated rail.",
      "title": "Tick Command Block On Deactivate"
    }
  },
  "examples": [
    {
      "check_block_types": false,
      "eject_on_activate": true,
      "eject_on_deactivate": false,
      "tick_command_block_on_activate": true,
      "tick_command_block_on_deactivate": false
    }
  ]
}
