File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
common/src/main/kotlin/com/lambda/util/combat Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,11 @@ object Explosion {
4747 * @param explosion The explosion to calculate the velocity for.
4848 * @return The velocity of the entities.
4949 */
50- fun SafeContext.velocity (explosion : Explosion ) =
51- getFastEntities<LivingEntity >(explosion.position, explosion.power * 2.0 , ArrayList ())
52- .associateWith { entity -> velocity(entity, explosion) }
50+ fun SafeContext.velocity (explosion : Explosion ): Map <LivingEntity , Vec3d > {
51+ val ref = ArrayList <LivingEntity >()
52+ getFastEntities<LivingEntity >(explosion.position, explosion.power * 2.0 , ref)
53+ return ref.associateWith { entity -> velocity(entity, explosion) }
54+ }
5355
5456 /* *
5557 * Calculates the velocity of a living entity affected by an explosion.
You can’t perform that action at this time.
0 commit comments