Interface ParticleOptionsFactory


@NullMarked @AsOf("2.0.0") public interface ParticleOptionsFactory
A factory for creating particle options handles.
Since:
2.0.0
  • Field Details

  • Method Details

    • block

      @AsOf("2.0.0") ParticleOptions block(ParticleType type, Material material)
      Creates a particle options handle for a block particle with the specified material.
      Parameters:
      type - The particle type handle corresponding to a block particle type.
      material - The material to use for the block particle effect.
      Returns:
      A ParticleOptionsHandle configured for the specified block particle type and material.
    • color

      @AsOf("2.0.0") ParticleOptions color(ParticleType type, int rgb)
      Creates a particle options handle for a color particle with the specified RGB color.
      Parameters:
      type - The particle type handle corresponding to a color particle type.
      rgb - The RGB color to use for the particle effect, represented as an integer (e.g., 0xRRGGBB).
      Returns:
      A ParticleOptionsHandle configured for the specified color particle type and RGB color.
    • dust

      @AsOf("2.0.0") ParticleOptions dust(int rgb, float size)
      Creates a particle options handle for a dust particle with the specified RGB color and size.
      Parameters:
      rgb - The RGB color to use for the particle effect, represented as an integer (e.g., 0xRRGGBB).
      size - The size of the dust particle effect.
      Returns:
      A ParticleOptionsHandle configured for the specified dust particle type and RGB color and size.
    • dustTransition

      @AsOf("2.0.0") ParticleOptions dustTransition(int fromRgb, int toRgb, float size)
      Creates a particle options handle for a dust transition particle with the specified RGB color and size.
      Parameters:
      fromRgb - The starting RGB color for the dust transition effect, represented as an integer (e.g., 0xRRGGBB).
      toRgb - The ending RGB color for the dust transition effect, represented as an integer (e.g., 0xRRGGBB).
      size - The size of the dust transition effect.
      Returns:
      A ParticleOptionsHandle configured for the specified dust transition particle type and RGB colors and size.
    • item

      @AsOf("2.0.0") ParticleOptions item(ParticleType type, ItemStack itemStack)
      Creates a particle options handle for an item particle with the specified item stack.
      Parameters:
      type - The particle type handle corresponding to an item particle type.
      itemStack - The item stack to use for the particle effect.
      Returns:
      A ParticleOptionsHandle configured for the specified item particle type and item stack.
    • power

      @AsOf("2.0.0") ParticleOptions power(ParticleType type, float power)
      Creates a particle options handle for a power particle with the specified power level.
      Parameters:
      type - The particle type handle corresponding to a power particle type.
      power - The power level to use for the particle effect.
      Returns:
      A ParticleOptionsHandle configured for the specified power particle type and power level.
    • sculkCharge

      @AsOf("2.0.0") ParticleOptions sculkCharge(float roll)
      Creates a particle options handle for a sculk charge particle with the specified roll.
      Parameters:
      roll - The roll of the sculk charge effect.
      Returns:
      A ParticleOptionsHandle configured for the specified sculk charge particle type and roll.
    • simple

      @AsOf("2.0.0") ParticleOptions simple(ParticleType type)
      Creates a particle options handle for a simple particle with the specified particle type.
      Parameters:
      type - The particle type handle corresponding to a simple particle type.
      Returns:
      A ParticleOptionsHandle configured for the specified simple particle type.
    • spell

      @AsOf("2.0.0") ParticleOptions spell(ParticleType type, int rgb, float power)
      Creates a particle options handle for a spell particle with the specified particle type, RGB color, and power.
      Parameters:
      type - The particle type handle corresponding to a spell particle type.
      rgb - The RGB color to use for the particle effect, represented as an integer (e.g., 0xRRGGBB).
      power - The power level to use for the particle effect.
      Returns:
      A ParticleOptionsHandle configured for the specified spell particle type, RGB color, and power.
    • trail

      @AsOf("2.0.0") ParticleOptions trail(Location target, int rgb, int duration)
      Creates a particle options handle for a trail particle with the specified target location, RGB color, and duration.
      Parameters:
      target - The target location for the trail particle effect.
      rgb - The RGB color to use for the particle effect, represented as an integer (e.g., 0xRRGGBB).
      duration - The duration of the trail particle effect in ticks.
      Returns:
      A ParticleOptionsHandle configured for the specified trail particle type, target location, RGB color, and duration.
    • vibration

      @AsOf("2.0.0") ParticleOptions vibration(Vibration.Destination destination, int arrivalInTicks)
      Creates a particle options handle for a vibration particle with the specified destination and arrival time.
      Parameters:
      destination - The destination of the vibration effect.
      arrivalInTicks - The arrival time of the vibration effect in ticks.
      Returns:
      A ParticleOptionsHandle configured for the specified vibration particle type and destination and arrival time.
    • typeByKey

      @AsOf("2.0.0") ParticleType typeByKey(String key)
      Retrieves a particle type handle by its key.
      Parameters:
      key - The key of the particle type.
      Returns:
      A ParticleTypeHandle corresponding to the particle type with the specified key.