Skip to content

Commit

Permalink
Fixed elytra_boost_save_chance
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed May 2, 2023
1 parent 7fafbf5 commit 3591d15
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ object EffectElytraBoostSaveChance : Effect<NoCompileData>("elytra_boost_save_ch
fun handle(event: PlayerElytraBoostEvent) {
val player = event.player

var chance = 100.0
var chance = 1.0

for (modifier in modifiers[player.uniqueId]) {
chance *= (100 - modifier.multiplier)
chance *= (100 - modifier.multiplier) / 100
}

if (NumberUtils.randFloat(0.0, 100.0) > chance) {
if (NumberUtils.randFloat(0.0, 1.0) > chance) {
event.setShouldConsume(false)
}
}
Expand Down

0 comments on commit 3591d15

Please sign in to comment.