Skip to content

Commands

Since 2.0.0

Photon2 does not manage when, where, or how VFX are used. While Photon provides some built-in commands, these are primarily for testing purposes.

✨ Basic Commands

CommandDescription
/photon particle_editorOpen the visual particle editor
/photon_client clear_particlesRemove all Photon particles
/photon_client clear_fx_cacheClear FX cache (run after changing .fx files)

📦 FX Binding & Emitting

Photon2 lets you bind effects to blocks or entities, or emit them at specific positions with full parameter control.

Command Format

shell
/photon fx <fxFile> <type> ... [offset] [rotation] [scale] [delay] [force death] [allow multi] ...
  • &lt;fxFile&gt;: Resource location of the FX file (e.g., mod_id:filename for assets/mod_id/fx/filename.fx)
  • &lt;type&gt;: block or entity
  • See parameter table below for details
ParameterRequiredDefaultDescription
fxFileYes-FX file resource name, e.g. photon:fire
typeYes-block or entity
offsetNo0 0 0Position offset (x y z)
rotationNo0 0 0Rotation (Euler angles: x y z)
scaleNo1 1 1Scale (x y z)
delayNo0Emit delay (ticks)
force deathNofalseImmediately remove all particles if the target becomes invalid
allow multiNofalseAllow multiple effects with the same name to be bound to the same object

🟦 Bind FX to a Block

Format:

shell
/photon fx <fxFile> block <position(x y z)> [offset] [rotation] [scale] [delay] [force death] [allow multi] [check state]
  • position: Required, block coordinates (x y z)
  • check state: If false (default), effect is removed if the block changes. If true, also removed if the blockstate changes.

Example:

shell
/photon fx photon:fire block ~ ~ ~ 0 0 0 0 0 0 1 1 1 0 false false false

🟩 Bind FX to Entities

Format:

shell
/photon fx <fxFile> entity <entities(selector)> [offset] [rotation] [scale] [delay] [force death] [allow multi] [auto rotation]
  • entities: Required, entity selector

  • auto rotation:

    • none (default): No rotation
    • forward: Forward direction
    • look: Head look direction
    • xrot: Body rotation direction

Example:

shell
/photon fx photon:fire entity @e[type=minecraft:minecart, distance=..1] 0 0.5 0 0 0 0 1 1 1 0 false false look

❌ Remove FX Commands

Command FormatExample
/photon fx remove block &lt;position(x y z)&gt; [force] [location]/photon fx remove block ~ ~ ~ true
/photon fx remove entity &lt;entities(selector)&gt; [force] [location]/photon fx remove entity @e[type=pig]
  • force: Remove all particles immediately if the object becomes invalid (true), or wait for natural death (false)
  • location: Specify FX resource location (optional)

📋 Parameter Notes & Tips

  • Position, rotation, and scale are always three numbers (x y z)
  • FX file path is usually assets/&lt;mod_id&gt;/fx/your_fx_name.fx
  • After changing any .fx file, always run /photon_client clear_fx_cache to refresh!

🌈 Advanced Usage Examples

Bind an effect to your feet

shell /photon fx photon:smoke block ~ ~-1 ~

Bind explosion FX to all pigs nearby

shell /photon fx photon:explosion entity @e[type=minecraft:pig, distance=..10]

Released under the MIT License.