diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt index a3ee8e36..57a39397 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt @@ -1,16 +1,20 @@ package at.petrak.hexcasting.common.casting.operators.spells -import at.petrak.hexcasting.api.misc.MediaConstants -import at.petrak.hexcasting.api.mod.HexConfig -import at.petrak.hexcasting.api.mod.HexTags -import at.petrak.hexcasting.api.casting.* +import at.petrak.hexcasting.api.casting.ParticleSpray +import at.petrak.hexcasting.api.casting.RenderedSpell import at.petrak.hexcasting.api.casting.castables.SpellAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment +import at.petrak.hexcasting.api.casting.getDouble +import at.petrak.hexcasting.api.casting.getEntity import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.mishaps.MishapImmuneEntity import at.petrak.hexcasting.api.casting.mishaps.MishapLocationTooFarAway +import at.petrak.hexcasting.api.misc.MediaConstants +import at.petrak.hexcasting.api.mod.HexConfig +import at.petrak.hexcasting.api.mod.HexTags import at.petrak.hexcasting.common.casting.operators.spells.great.OpTeleport import net.minecraft.world.entity.Entity +import kotlin.math.absoluteValue import kotlin.math.roundToInt object OpBlink : SpellAction { @@ -42,7 +46,7 @@ object OpBlink : SpellAction { return Triple( Spell(target, delta), - (MediaConstants.SHARD_UNIT * delta * 0.5).roundToInt(), + (MediaConstants.SHARD_UNIT * delta.absoluteValue * 0.5).roundToInt(), listOf( ParticleSpray.cloud(targetMiddlePos, 2.0, 50), ParticleSpray.burst(targetMiddlePos.add(dvec), 2.0, 100)