Revert "Fix error message thrown by getChecked"
This reverts commit 608c336cb8
.
This commit is contained in:
parent
608c336cb8
commit
cb6e1d6a21
1 changed files with 1 additions and 2 deletions
|
@ -3,7 +3,6 @@ package at.petrak.hexcasting.api
|
|||
import at.petrak.hexcasting.common.casting.CastException
|
||||
import at.petrak.hexcasting.common.casting.CastingContext
|
||||
import net.minecraft.world.phys.Vec3
|
||||
import kotlin.math.abs
|
||||
|
||||
/**
|
||||
* Manipulates the stack in some way, usually by popping some number of values off the stack
|
||||
|
@ -44,7 +43,7 @@ interface Operator {
|
|||
*/
|
||||
@JvmStatic
|
||||
inline fun <reified T : Any> List<SpellDatum<*>>.getChecked(idx: Int): T {
|
||||
val x = this.getOrElse(idx) { throw CastException(CastException.Reason.NOT_ENOUGH_ARGS, abs(idx), this.size) }
|
||||
val x = this.getOrElse(idx) { throw CastException(CastException.Reason.NOT_ENOUGH_ARGS, idx, this.size) }
|
||||
return x.tryGet()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue