fix two arguments incorrectly being inclusive
This commit is contained in:
parent
61e292af10
commit
9730a252f2
2 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ object OpModifyInPlace : ConstMediaAction {
|
|||
override val argc = 3
|
||||
override fun execute(args: List<Iota>, ctx: CastingContext): List<Iota> {
|
||||
val list = args.getList(0, argc)
|
||||
val index = args.getPositiveIntUnderInclusive(1, list.size(), argc)
|
||||
val index = args.getPositiveIntUnder(1, list.size(), argc)
|
||||
val iota = args[2]
|
||||
return list.modifyAt(index) { SpellList.LPair(iota, it.cdr) }.asActionResult
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ object OpBeep : SpellAction {
|
|||
ctx: CastingContext
|
||||
): Triple<RenderedSpell, Int, List<ParticleSpray>> {
|
||||
val target = args.getVec3(0, argc)
|
||||
val instrument = args.getPositiveIntUnderInclusive(1, NoteBlockInstrument.values().size, argc)
|
||||
val instrument = args.getPositiveIntUnder(1, NoteBlockInstrument.values().size, argc)
|
||||
val note = args.getPositiveIntUnderInclusive(2, 24, argc) // mojang don't have magic numbers challenge
|
||||
ctx.assertVecInRange(target)
|
||||
|
||||
|
|
Loading…
Reference in a new issue