walksanatora / HexTweaks

Small tweaks to Hexcasting (and addons) also adds some patterns
MIT License
0 stars 4 forks source link

Accessing Unknown Key from Dictionary Mishaps #5

Closed JohnDog3112 closed 1 year ago

JohnDog3112 commented 1 year ago

Versions:

Quilt - 0.19.0-beta.13 Hex Casting - 0.10.3 HexTweaks - 3.2.2

Description:

When using Clerk's Surgeon's Exaltation or Clerk's Excisor's Distillation with a key not included in the dictionary, a mishap occurs.

Test Cases:

Clerk's Surgeon's Exaltation image

[16:18:12] [Server thread/INFO]: [STDERR]: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1 [16:18:12] [Server thread/INFO]: [STDERR]: at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) [16:18:12] [Server thread/INFO]: [STDERR]: at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) [16:18:12] [Server thread/INFO]: [STDERR]: at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) [16:18:12] [Server thread/INFO]: [STDERR]: at java.base/java.util.Objects.checkIndex(Objects.java:359) [16:18:12] [Server thread/INFO]: [STDERR]: at java.base/java.util.ArrayList.get(ArrayList.java:427) [16:18:12] [Server thread/INFO]: [STDERR]: at net.walksanator.hextweaks.iotas.DictionaryIota.get(DictionaryIota.java:128) [16:18:12] [Server thread/INFO]: [STDERR]: at net.walksanator.hextweaks.patterns.dict.OpDictPop.execute(OpDictPop.java:23) [16:18:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.ConstMediaAction$DefaultImpls.operate(ConstMediaAction.kt:29) [16:18:12] [Server thread/INFO]: [STDERR]: at net.walksanator.hextweaks.patterns.dict.OpDictPop.operate(OpDictPop.java:12) [16:18:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.updateWithPattern(CastingHarness.kt:275) [16:18:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.getUpdate(CastingHarness.kt:183) [16:18:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.eval.FrameEvaluate.evaluate(FrameEvaluate.kt:34) [16:18:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.executeIotas(CastingHarness.kt:113) [16:18:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.handler$hdm000$hexal$executeIotaMacro(CastingHarness.kt:1519) [16:18:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.executeIota(CastingHarness.kt) [16:18:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.common.network.MsgNewSpellPatternSyn.lambda$handle$0(MsgNewSpellPatternSyn.java:92) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3738.run(class_3738.java:18) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_18859(class_1255.java:157) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_4093.method_18859(class_4093.java:23) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:776) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:159) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_16075(class_1255.java:131) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:758) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:752) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_5383(class_1255.java:116) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:736) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.handler$gjd000$carpet$modifiedRunLoop(MinecraftServer.java:9894) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:644) [16:18:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) [16:18:12] [Server thread/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Thread.java:833) [16:18:12] [Render thread/INFO]: [CHAT] Clerk's Surgeon's Exaltation threw an exception (java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1). This is a bug in the mod.

Clerk's Excisor's Distillation: image

[16:19:12] [Server thread/INFO]: [STDERR]: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1 [16:19:12] [Server thread/INFO]: [STDERR]: at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) [16:19:12] [Server thread/INFO]: [STDERR]: at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) [16:19:12] [Server thread/INFO]: [STDERR]: at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) [16:19:12] [Server thread/INFO]: [STDERR]: at java.base/java.util.Objects.checkIndex(Objects.java:359) [16:19:12] [Server thread/INFO]: [STDERR]: at java.base/java.util.ArrayList.get(ArrayList.java:427) [16:19:12] [Server thread/INFO]: [STDERR]: at net.walksanator.hextweaks.iotas.DictionaryIota.remove(DictionaryIota.java:178) [16:19:12] [Server thread/INFO]: [STDERR]: at net.walksanator.hextweaks.patterns.dict.OpDictRemove.execute(OpDictRemove.java:23) [16:19:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.ConstMediaAction$DefaultImpls.operate(ConstMediaAction.kt:29) [16:19:12] [Server thread/INFO]: [STDERR]: at net.walksanator.hextweaks.patterns.dict.OpDictRemove.operate(OpDictRemove.java:12) [16:19:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.updateWithPattern(CastingHarness.kt:275) [16:19:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.getUpdate(CastingHarness.kt:183) [16:19:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.eval.FrameEvaluate.evaluate(FrameEvaluate.kt:34) [16:19:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.executeIotas(CastingHarness.kt:113) [16:19:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.handler$hdm000$hexal$executeIotaMacro(CastingHarness.kt:1519) [16:19:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.api.spell.casting.CastingHarness.executeIota(CastingHarness.kt) [16:19:12] [Server thread/INFO]: [STDERR]: at at.petrak.hexcasting.common.network.MsgNewSpellPatternSyn.lambda$handle$0(MsgNewSpellPatternSyn.java:92) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3738.run(class_3738.java:18) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_18859(class_1255.java:157) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_4093.method_18859(class_4093.java:23) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:776) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:159) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_16075(class_1255.java:131) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:758) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:752) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_18857(class_1255.java:140) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:737) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.handler$gjd000$carpet$modifiedRunLoop(MinecraftServer.java:9894) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:644) [16:19:12] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) [16:19:12] [Server thread/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Thread.java:833) [16:19:12] [Render thread/INFO]: [CHAT] Clerk's Excisor's Distillation threw an exception (java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1). This is a bug in the mod.

walksanatora commented 1 year ago

i think I forgot to close this one