{
  "format_version": "1.10.0",
  "particle_effect": {
    "description": {
      "identifier": "minecraft:end_chest",
      "basic_render_parameters": {
        "material": "particles_blend",
        "texture": "textures/particle/portal_effect"  // Cambiar la textura a portal_effect
      }
    },
    "components": {
      "minecraft:emitter_rate_instant": {
        "num_particles": 1
      },

      "minecraft:emitter_lifetime_expression": {
        "activation_expression": 1,
        "expiration_expression": 1
      },

      "minecraft:emitter_shape_point": {
        "offset": [
          "variable.custom_random1 = Math.Random(0.0, 1.0); variable.custom_random2 = Math.Random(0.0, 1.0); return 0.0;",
          "variable.custom_random3 = Math.Random(0.0, 1.0); variable.custom_random4 = Math.Random(0.0, 1.0); return 0.0;",
          "variable.custom_random5 = Math.Random(0.0, 1.0); variable.custom_random6 = Math.Random(0.0, 1.0); return 0.0;"
        ]
      },

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

      "minecraft:particle_motion_parametric": {
        "relative_position": [
          "variable.alpha = variable.particle_age / variable.particle_lifetime; variable.distance = (1 - (-1 * (variable.alpha) + Math.Pow((variable.alpha), 2) * 2)); variable.random_directionX = (Math.Round(variable.custom_random3) * 2 - 1); return 0.25 * variable.random_directionX + variable.custom_random2 * variable.random_directionX * variable.distance;",
          "1.0 + ((variable.custom_random6 - 0.5) * 0.125) * variable.distance - variable.alpha",
          "variable.random_directionZ = (Math.Round(variable.custom_random5) * 2 - 1); return 0.25 * variable.random_directionZ + variable.custom_random4 * variable.random_directionZ * variable.distance;"
        ]
      },

      "minecraft:particle_appearance_billboard": {
        "size": [
          "(variable.particle_random_2 * 0.05 + 0.2) * (1 - Math.Pow((1 - (variable.particle_age / variable.particle_lifetime)), 2))",
          "(variable.particle_random_2 * 0.05 + 0.2) * (1 - Math.Pow((1 - (variable.particle_age / variable.particle_lifetime)), 2))"
        ],
        "facing_camera_mode": "lookat_xyz",

        "uv": {
          "texture_width": 160,  // Cambiar a 160 para el portal_effect
          "texture_height": 20,  // Cambiar a 20 para el portal_effect
          "uv": ["Math.round(variable.custom_random1 * 8) * 20", 0],  // Ajuste para seleccionar áreas de 20x20
          "uv_size": [20, 20]  // Cada área es de 20x20
        }
      },

      "minecraft:particle_appearance_tinting": {
        // Cambiar el color para usar el color por defecto de la textura
        "color": [1.0, 1.0, 1.0, 1.0]  // Blanco (sin tintado)
      }
    }
  }
}