beam_template_script: type: task debug: false script: - playsound sound:block_trial_spawner_spawn_item_begin volume:2.0 - define origin - define current_location <[origin]> - define direction # default range = 30 - define range 30 # de fault speed = 2 - define speed 2 #- define impact_amount 10 # default effect = dust_color_transition (if you change from dust, you must remove or modify the special data portion on the - playeffect command below) - define effect dust_color_transition # default particle_thickness = 10 - define particle_thickness 10 # default hit_effect = flash - define hit_effect flash # default hit_particle_thickness = 5 - define hit_particle_thickness 5 # default base_step_distance = 0.25 --> Do not change - define base_step_distance 0.25 - define step_distance <[base_step_distance].mul[<[speed]>]> - define step_vector <[direction].mul[<[step_distance]>]> - repeat <[range].div[<[step_distance]>]> as:step: - define current_location <[current_location].add[<[step_vector]>]> - playeffect effect:<[effect]> quantity:<[particle_thickness]> at:<[current_location]> visibility:50 offset:0.1,0.1,0.1 special_data:1.0|white|red - if <[current_location].material.is_solid>: - playeffect at:<[current_location]> quantity:<[hit_particle_thickness]> effect:<[hit_effect]> visibility:50 - playsound sound:entity_firework_rocket_large_blast <[current_location]> volume:2.0 - stop - if !<[current_location].find_entities.within[0.4].is_empty> && <[step]> >= 6: - define hit_entity <[current_location].find_entities.within[0.4]> - playeffect at:<[hit_entity].location> quantity:<[hit_particle_thickness]> effect:<[hit_effect]> offset:0,1,0 - playsound sound:entity_firework_rocket_large_blast <[hit_entity].location> volume:2.0 #- hurt <[impact_amount]> target:<[hit_entity]> - stop - wait 1t