From 25afe5a74bf46fa638753c4e3697a51fc97f640a Mon Sep 17 00:00:00 2001 From: gamma-delta <29877714+gamma-delta@users.noreply.github.com> Date: Fri, 10 Jun 2022 18:41:22 -0500 Subject: [PATCH] yeah i probably shouldve seen that one coming --- .../java/at/petrak/hexcasting/interop/pehkui/OpSetScale.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/interop/pehkui/OpSetScale.kt b/Common/src/main/java/at/petrak/hexcasting/interop/pehkui/OpSetScale.kt index 65c7070b..a6f2bb29 100644 --- a/Common/src/main/java/at/petrak/hexcasting/interop/pehkui/OpSetScale.kt +++ b/Common/src/main/java/at/petrak/hexcasting/interop/pehkui/OpSetScale.kt @@ -3,6 +3,7 @@ package at.petrak.hexcasting.interop.pehkui import at.petrak.hexcasting.api.spell.* import at.petrak.hexcasting.api.spell.casting.CastingContext import at.petrak.hexcasting.xplat.IXplatAbstractions +import net.minecraft.util.Mth import net.minecraft.world.entity.Entity object OpSetScale : SpellOperator { @@ -13,8 +14,8 @@ object OpSetScale : SpellOperator { ctx: CastingContext ): Triple> { val target = args.getChecked(0) - val scale = args.getChecked(1) - + val scale = Mth.clamp(args.getChecked(1), 1.0 / 32.0, 5.0) + return Triple( Spell(target, scale), 50_000,