mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-21 14:55:17 +01:00
Fixed raid
This commit is contained in:
parent
22d2ab3e37
commit
e51941f430
@ -8,6 +8,7 @@ import org.bukkit.event.EventHandler
|
||||
import org.bukkit.event.EventPriority
|
||||
import org.bukkit.event.Listener
|
||||
import org.bukkit.event.entity.EntityShootBowEvent
|
||||
import kotlin.math.min
|
||||
|
||||
class EnchantmentRapid(
|
||||
plugin: EcoEnchantsPlugin
|
||||
@ -38,8 +39,12 @@ class EnchantmentRapid(
|
||||
return
|
||||
}
|
||||
|
||||
val force = 1 / event.force
|
||||
event.projectile.velocity = event.projectile.velocity.multiply(force)
|
||||
val force = min(1.0 / event.force, Double.MAX_VALUE)
|
||||
var velocity = event.projectile.velocity.multiply(force)
|
||||
if (velocity.length() > 3) {
|
||||
velocity = velocity.normalize().multiply(3)
|
||||
}
|
||||
event.projectile.velocity = velocity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#libreforge-updater
|
||||
#Sun Oct 16 23:28:02 BST 2022
|
||||
version=9.0.0
|
||||
version=9.0.1
|
||||
plugin-name=EcoEnchants
|
||||
|
Loading…
Reference in New Issue
Block a user