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,