Added more options to arrow storm

This commit is contained in:
Auxilor
2021-07-22 23:56:20 +01:00
parent 455ec5baf7
commit 49d0200f14
2 changed files with 8 additions and 4 deletions

View File

@@ -56,8 +56,10 @@ public class EffectArrowStorm extends Effect {
private void handle(@NotNull final Location location,
@NotNull final JSONConfig args) {
int amount = args.getInt("amount");
double height = args.getDouble("height");
double radius = args.getDouble("radius");
Location apex = location.clone().add(0, 5, 0);
Location apex = location.clone().add(0, height, 0);
World world = location.getWorld();
assert world != null;
@@ -68,9 +70,9 @@ public class EffectArrowStorm extends Effect {
Location spawn = apex.clone();
spawn.add(
Math.sin(angle),
Math.sin(angle * i) * radius,
0,
Math.cos(angle)
Math.cos(angle * i) * radius
);
world.spawn(

View File

@@ -7,7 +7,9 @@
{
"id": "arrow-storm",
"args": {
"amount": 5
"amount": 5,
"height": 5,
"radius": 2
},
"trigger": "projectile_hit"
}