Started by
EnergyDevelop
on
Topic category: Help with Minecraft modding (Java Edition)
I've been trying to work on my sun breathing sword (totally not inspired by a particular anime), it has multiple modes.
Here is the procedure:
https://www.mediafire.com/file/g0jvd8dasnh7vbb/sun_sword_procedure.ptpl…
(I couldnt attach it as an image as its quite big and wont fit.)
It was working completely fine until I launched and then it just broke.
I'm getting this in the output:
Executing Gradle task: build
Build info: MCreator 2021.2.36710, forge-1.16.5, 64-bit, 16208 MB, Windows 10, JVM 11.0.11, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk
> Task :compileJava
C:\Users\Admin\MCreatorWorkspaces\energix_demonslayer\src\main\java\me\energix\demonslayer\procedures\HitBySunNichirinProcedure.java:110: error: variable entityiterator is already defined in method executeProcedure(java.util.Map )
for (Entity entityiterator : _entfound) {
^
C:\Users\Admin\MCreatorWorkspaces\energix_demonslayer\src\main\java\me\energix\demonslayer\procedures\HitBySunNichirinProcedure.java:158: error: variable entityiterator is already defined in method executeProcedure(java.util.Map )
for (Entity entityiterator : _entfound) {
^
2 errors
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 6s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 9 seconds
Would anyone know what to do in this situation?
You are using two entitys iterators, change the java code or one entity iterator
Or use one entity iterator*
But they are in different places, shouldnt one be in one scope and the other be in another? Also, I tried changing the java code and that didnt work, it stopped the crashing but completely broke the sword.
You are using entity iterator outside for each entity procedure block, this will of course not work
So you cant use entity iterator twice in one procedure? Would I have to use multiple procedures and call them then?
You can, this is not the problem. The problem is