Skip to content

Commit

Permalink
Fixed fireworks not detonating on 1.12.2
Browse files Browse the repository at this point in the history
Detonation needed to be scheduled. Also slightly increased the default firework arrow speed.
  • Loading branch information
SugarCaney committed Mar 21, 2022
1 parent c2ebadc commit 77d76f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import nl.sugcube.dirtyarrows.bow.BowAbility
import nl.sugcube.dirtyarrows.bow.DefaultBow
import nl.sugcube.dirtyarrows.util.ColourScheme
import nl.sugcube.dirtyarrows.util.fuzz
import nl.sugcube.dirtyarrows.util.scheduleDelayed
import nl.sugcube.dirtyarrows.util.showColoredDust
import org.bukkit.*
import org.bukkit.entity.*
Expand Down Expand Up @@ -213,7 +214,10 @@ open class FireworkBow(plugin: DirtyArrows) : BowAbility(

addEffect(effectBuilder.build())
}
detonate()

plugin.scheduleDelayed(1) {
detonate()
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1998,8 +1998,8 @@ firework:
# Settings for the main projectile: the one you fire from your bow.
main:
# The maximum speed the main firework projectiles can move.
# (Double) default: 1.25
maximum-speed: 1.25
# (Double) default: 1.4
maximum-speed: 1.4

# The amount of milliseconds the main projectile flies before splitting into multiple projectiles.
# (Int) default: 1450
Expand Down

0 comments on commit 77d76f7

Please sign in to comment.