Closed EdwinYoungSteve closed 1 month ago
Post full debug log
============ GroovyLog ==== 27.08.2024 ============ GroovyScript version: 1.1.3 [16:19:56] [CLIENT/INFO] [greedycraft]: Running scripts in loader 'preInit' [16:20:44] [CLIENT/INFO] [greedycraft]: Running scripts in loader 'init' [16:20:45] [CLIENT/INFO] [greedycraft]: - running init.thaumcraft [16:20:45] [CLIENT/ERROR] [greedycraft]: An exception occurred while running scripts. Look at latest.log for a full stacktrace: java.lang.ArrayIndexOutOfBoundsException: 0 at thaumcraft.api.aspects.Aspect.<init>(Aspect.java:48) at com.cleanroommc.groovyscript.compat.mods.thaumcraft.aspect.Aspect$AspectBuilder.register(Aspect.java:120) at init.thaumcraft.run(thaumcraft.groovy:15) at com.cleanroommc.groovyscript.sandbox.GroovySandbox.runScript(GroovySandbox.java:167) at com.cleanroommc.groovyscript.sandbox.GroovyScriptSandbox.runScript(GroovyScriptSandbox.java:181) at com.cleanroommc.groovyscript.sandbox.GroovySandbox.loadScripts(GroovySandbox.java:140) [16:20:50] [CLIENT/INFO] [greedycraft]: Running scripts in loader 'postInit'
thats not the debug log. Thats the groovy log
pretty sure this is the issue, line 120 in Aspect.java
- thaumcraft.api.aspects.Aspect aspect = new thaumcraft.api.aspects.Aspect(tag, chatColor, components.getAspects(), image, blend);
+ thaumcraft.api.aspects.Aspect aspect = new thaumcraft.api.aspects.Aspect(tag, chatColor, components.size() == 0 ? null : components.getAspects(), image, blend);
java.lang.ArrayIndexOutOfBoundsException: 0
at thaumcraft.api.aspects.Aspect.
很确定这就是问题所在,第 120 行
Aspect.java
- thaumcraft.api.aspects.Aspect aspect = new thaumcraft.api.aspects.Aspect(tag, chatColor, components.getAspects(), image, blend); + thaumcraft.api.aspects.Aspect aspect = new thaumcraft.api.aspects.Aspect(tag, chatColor, components.size() == 0 ? null : components.getAspects(), image, blend);
so……can u fix this bug? plz
If I don't fill in any sub-aspects, debugging will show an array out-of-bounds exception.