Topic category: Troubleshooting, bugs, and solutions
My custom geckolib entity is not compiling, i have made sure the model and animation names are the same and have no capital letters. I have enabled the geckolib dependency in my workspace and also enabled java plugins. Whenever i try to test the mod, the geckolib mob will not compile. How do i fix this?
Here is the log/whatever its called:
Executing Gradle task: runClient
Build info: MCreator 2023.3.35319, forge-1.20.1, 64-bit, 8192 MB, Mac OS X, JVM 17.0.7, JAVA_HOME: /Users/lilstaffo28/Documents/mcreator2.app/Contents/jdk.bundle/Contents/Home, started on: 2023-09-27-21:44:59
> Task :compileJava FAILED
/Users/lilstaffo28/MCreatorWorkspaces/catcatcat/src/main/java/net/mcreator/catcatcat/entity/PoisonVoidlingEntity.java:244: error: cannot find symbol if (!this.isOnGround()) {
^
symbol: method isOnGround()
/Users/lilstaffo28/MCreatorWorkspaces/catcatcat/src/main/java/net/mcreator/catcatcat/entity/PoisonVoidlingEntity.java:258: error: level has private access in Entity this.lastSwing = level.getGameTime();
^
/Users/lilstaffo28/MCreatorWorkspaces/catcatcat/src/main/java/net/mcreator/catcatcat/entity/PoisonVoidlingEntity.java:260: error: level has private access in Entity if (this.swinging && this.lastSwing + 7L <= level.getGameTime()) {
^
3 errors
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
BUILD FAILED in 4s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 7 seconds
I would recommend reporting the bug to the plugin author
You can see more info at the issue tracker of the plugin at https://github.com/NerdyPuzzle/MCreator-Nerdys_Geckolib_Plugin/issues/50
I had the same issue, here's how to solve it :
replace method "isOnGround" with "onGround"
change "level.getGameTime()" --> "level().getGameTime()"
hope this helped
I have the same problem too, mine is not compiling and its animations are not capital and no spaces, plus I know there is no problem but it just wont compile for "compileJava" cuz of my mob.