๐Ÿ’š
Treasure Particles
  • Home Page
  • Discord Server
  • Download
    • ๐ŸงกBuiltByBit
  • Effects
    • Basic Usage
    • Creating Effect
      • Caching
      • Variables
      • Tick Handlers
        • Events
        • Mixer Options
      • Script Types
        • Variable
        • Variable Cycle
        • Particle
          • Single Particle
          • Circle Particle
            • Spread Particle
            • Targeted Circle Particle
          • Spiral Effects
            • Spiral Particle
            • Multi Spiral Particle
            • Full Spiral Particle
          • Targeted Particle
          • Sphere Particle
          • Text Particle
            • Animated Text Particle
          • Particles
          • Color Format
        • Parkour
        • Condition
        • Preset
        • Sound
        • Message
          • Chat Message
          • Action Bar Message
          • Title Message
        • Lightning
        • Others
    • Presets
    • Mixer
    • Static Effects
  • Colors
    • Adding New Color Scheme
    • Adding New Color Group
  • Configuration
    • General Options
    • Database
    • Permissions
    • GUI Config
      • Item Properties
  • Translations
Powered by GitBook
On this page
  • Description
  • Examples
  1. Effects
  2. Creating Effect

Tick Handlers

This page was last updated for version v1.2.0

Description

Tick Handlers are the section where scripts are written. In addition, the number of times these scripts are run can also be set. Any number of Tick Handlers can be added, with the one added at the beginning running first (order sensitive).

Tick Handlers should be written inside the on-tick section. You can also change the interval of the effect.

interval: <INTEGER> # In ticks, default=1
on-tick:
  example-tick-handler: # Tick handler key
    event: <EVENT> # Required
    display-name: <STRING> # Optional, default="[<INDEX>]"
    interval: <INTEGER> # Optional, default="effect interval"
    times: <INTEGER> # Optional, default=1 
    mixer-options: # Optional
      private: <BOOLEAN> # Optional, default=false
      lock-event: <BOOLEAN> # Optional, default=true
      depend: <LIST> # Optional, default=empty list
    scripts:
      - ...
      - ...

Events

Mixer Options

Examples

effects:
  example-effect:
    display-name: "%example%"
    variables: [ 'r', 'x','y' ]
    interval: 10 # in ticks
    on-tick:
      tick-handler-1:
        event: ELYTRA
        times: 32 # How many times will 'do' lines invoke
        scripts:
          - ...
          - ...
      tick-handler-2:
        event: PROJECTILE
        scripts:
          - ...
          - ...
effects:
  rainbow-circle:
    display-name: "Rainbow Circle"
    variables: [ 'r', 'x', 'y' ]
    interval: 1
    on-tick:
      spawn-particle:
        event: ELYTRA
        times: 32
        scripts: # Don't copy paste this code, use 'circle' script instead.
          - variable r=2*{PI}*{i}/32
          - variable x=cos({r})
          - variable y=sin({r})
          - particle [effect=minecraft:dust,direction=true,pos={x={x};y={y}},amount=10,origin=head*-1.25,color={name=rainbow;speed=0.75}]
      play-sound:
        event: ELYTRA
        scripts:
          - sound [name=entity.arrow.hit_player,client=true,volume=0.1,pitch=1]
      send-action-bar:
        event: ELYTRA
        scripts:
          - actionbar <rainbow><b>COOL RAINBOW EFFECT!
PreviousVariablesNextEvents

Last updated 1 year ago