{
  "format_version": "1.10.0",
  "particle_effect": {
    "description": {
      "identifier": "legacy:enchanter_spell",
      "basic_render_parameters": {
        "material": "particles_alpha",
        "texture": "textures/particle/particles"
      }
    },
    "components": {
      "minecraft:emitter_rate_steady": {
        "spawn_rate": 20,
        "max_particles": 50
      },

      "minecraft:emitter_lifetime_looping": {
        "active_time": 10
      },

      "minecraft:emitter_shape_point": {
        "direction": [
          "-0.5 + Math.Random(0, 1) + (Math.Random(0, 2) - 1) * 0.4",
          "(1 + (Math.Random(0, 2) - 1) * 0.4) * 0.5",
          "-0.5 + Math.Random(0, 1) + (Math.Random(0, 2) - 1) * 0.4"
        ]
      },

      "minecraft:particle_initial_speed": "(Math.Random(0, 1) + Math.Random(0, 1) + 1) * 0.6",

      "minecraft:particle_lifetime_expression": {
        "max_lifetime": "Math.Random(0.4, 2.0)"
      },

      "minecraft:particle_motion_dynamic": {
        "linear_acceleration": [ 0, 0.1, 0 ]
      },

      "minecraft:particle_motion_collision": {
        "collision_radius": 0.2
      },

      "minecraft:particle_appearance_billboard": {
        "size": [ 0.15, 0.15 ],
        "facing_camera_mode": "lookat_xyz",

        "uv": {
          "texture_width": 128,
          "texture_height": 128,
          "uv": [
            "variable.particle_random_3 < 0.5 ? Math.round(variable.particle_random_2 * 14) * 8 + 8 : Math.round(variable.particle_random_2 * 10) * 8",
            "variable.particle_random_3 < 0.5 ? 112 : 120"
          ],
          "uv_size": [ 8, 8 ]
        }
      },

      "minecraft:particle_appearance_tinting": {
        "color": [ "query.spellcolor.r", "query.spellcolor.g", "query.spellcolor.b", 1 ]
      },

      "minecraft:particle_appearance_lighting": {}
    }
  }
}
