firework_arrow: type: item debug: false material: arrow display name: Firework Arrow lore: - <&a>Fire this arrow - <&b>for magic funtime - <&d>surprise! - <&c>(Requires BPG Launcher) recipe: - i@arrow|i@tnt|i@tnt - i@firework|i@air|i@air - i@air|i@air|i@air sharp_arrow: type: item debug: false material: arrow display name: Sharpened Arrow lore: - <&c>This arrow is - <&c>extra sharp! recipe: - i@arrow|i@arrow|i@arrow - i@air|i@air|i@air - i@air|i@air|i@air shotblast_arrow: type: item debug: false material: arrow display name: Bundle Of Arrow lore: - <&c>Launches 3 arrows - <&c>all at once! recipe: - i@arrow|i@arrow|i@arrow - i@string|i@string|i@string - i@air|i@air|i@air fast_arrow: type: item debug: false material: arrow display name: Faster Arrow lore: - <&c>This arrow moves - <&c>extra fast! recipe: - i@arrow|i@arrow|i@redstone - i@air|i@air|i@air - i@air|i@air|i@air weak_arrow: type: item debug: false material: arrow display name: Weakened Arrow lore: - <&c>This arrow is - <&c>damaged. bpg_bow: type: item debug: false material: bow display name: BPG Launcher lore: - <&c>Bow Propelled Grenade - <&c>Launcher. - <&c>(Requires BPG Arrows) recipe: - i@bow|i@tnt|i@tnt - i@diamond_block|i@tnt|i@tnt - i@iron_block|i@iron_block|i@iron_block weak_bpg_arrow: type: item debug: false material: arrow display name: Weak BPG Arrow lore: - <&c>This arrow explodes - <&c>weakly on impact. - <&c>(Requires BPG Launcher) recipe: - i@arrow|i@tnt|i@air - i@air|i@air|i@air - i@air|i@air|i@air strong_bpg_arrow: type: item debug: false material: arrow display name: Strong BPG Arrow lore: - <&c>This arrow explodes - <&c>strongly on impact. - <&c>(Requires BPG Launcher) recipe: - i@arrow|i@tnt|i@tnt - i@air|i@air|i@air - i@air|i@air|i@air superior_bpg_arrow: type: item debug: false material: arrow display name: Superior BPG Arrow lore: - <&c>This arrow explodes for - <&c>massive damage on impact. - <&c>(Requires BPG Launcher) mininuke_bpg_arrow: type: item debug: false material: arrow display name: Mininuke BPG Arrow lore: - <&c>This arrow explodes - <&c>with nuclear force on impact. - <&c>(Requires BPG Launcher) recipe: - i@tnt|i@arrow|i@tnt - i@tnt|i@tnt|i@tnt - i@air|i@air|i@air firework_arrow_determine_type: type: task debug: false script: - if == i@firework_arrow { - flag player arrowtype:firework } else if == i@weak_bpg_arrow { - flag player arrowtype:weak_bpg } else if == i@strong_bpg_arrow { - flag player arrowtype:strong_bpg } else if == i@superior_bpg_arrow { - flag player arrowtype:superior_bpg } else if == i@mininuke_bpg_arrow { - flag player arrowtype:mininuke_bpg } else { - narrate "<&c>You've loaded the wrong arrow type. Must load an explosive round!" - determine cancelled } - flag player arrows:|: duration:10s - flag player arrows:|: duration:10s firework_arrow_world: type: world debug: false events: on player shoots bow: - flag player arrowtype:! - define item ]> - adjust %item% quantity:1 save:myitem - if == i@bpg_bow { - inject firework_arrow_determine_type } - if == i@sharp_arrow { - flag player arrowtype:sharp - flag player arrows:|: duration:10s } else if == i@weak_arrow { - flag player arrowtype:damaged - flag player arrows:|: duration:10s } else if == i@fast_arrow { - shoot arrow[critical=true] o: speed: - take qty:1 - playsound sound:shoot_arrow - determine cancelled } else if == i@shotblast_arrow { - shoot arrow|arrow|arrow o: speed: spread:20 - take qty:1 - playsound sound:shoot_arrow - determine cancelled } on projectile hits block: - if == null queue clear - if matches player { - if !]> queue clear - run firework_arrow_handler_internal def:| as: } on arrow damages entity: - if matches player { - if !]> queue clear - if == sharp determine - if == damaged determine - run firework_arrow_handler_internal def:|null as: } firework_arrow_handler_internal: type: task debug: false speed: 2t script: - ^if == firework { - define t1 ,,, - explode %1% power:2 - spawn %1% firework[firework_item=i@firework[firework=true,false,%t1%,,,|0];velocity=0,0,0,] - spawn %1% firework[firework_item=i@firework[firework=true,false,%t1%,,,|0];velocity=0,0,0,] save:myfirework - if %2% != null remove %2% - wait 5t - adjust detonate } else if == weak_bpg { - explode %1% power:1 - if %2% != null remove %2% } else if == strong_bpg { - if explode %1% power:1 fire breakblocks - explode %1% power:2 - if %2% != null remove %2% } else if == superior_bpg { - define t1 ,,, - explode %1% power:2 fire breakblocks - spawn %1% firework[firework_item=i@firework[firework=true,false,%t1%,,,|0];velocity=0,0,0,] - spawn %1% firework[firework_item=i@firework[firework=true,false,%t1%,,,|0];velocity=0,0,0,] save:myfirework - if %2% != null remove %2% - wait 5t - adjust detonate } else if == mininuke_bpg { - if explode %1% power:3 fire breakblocks - explode %1% power:5 - run mininuke_bpg_shroomcloud def:%1% - if %2% != null remove %2% } mininuke_bpg_shroomcloud: type: task speed: 1t definitions: center script: - ^playeffect %center% effect:huge_explosion visibility:100 # draw the tall cloud - ^repeat 6 { - define center - ^playeffect effect:flame %center% offset:1 qty:50 visibility:100 - ^playeffect effect:explode %center% offset:1 qty:15 visibility:100 - ^playeffect effect:large_explode %center% visibility:100 - playsound %center% enderdragon_growl pitch:0 - wait 1t } # straight lines x+ z+ y+ x- y- z- - ^define vecs li@1,0,0|0,0,1|0,1,0|-1,0,0|0,0,-1|0,-1,0 # Angles y=0 x- z- x+ z+ x+ z- x- z+ - ^define vecs %vecs%|-0.7,0,-0.7|0.7,0,0.7|0.7,0,-0.7|-0.7,0,0.7 # Raised lines: y+ x+ z+ x- z- - ^define vecs %vecs%|0.7,0.7,0|0,0.7,0.7|-0.7,0.7,0|0,0.7,-0.7 # draw the top shroom - ^repeat 8 { - ^define offset %value% - ^foreach %vecs% { - ^playeffect effect:explode ,0,]> offset: qty: visibility:100 - ^playeffect effect:large_explode ,0,]> offset: qty:%offset% visibility:100 } - ^wait 3t }