I need help wih :CompileJava

Started by lauti83 on

Topic category: Help with MCreator software

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help wih :CompileJava

Hello, I'm creating a mod about pets, and used geckolib to create a custom entity, but when i try to save it, it gives me an error.

 

Fabric Loom: 1.0.18
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.
> Task :compileJava FAILED
C:\Users\Lautaro\Desktop\mods\src\main\java\net\mcreator\tinyfriends\client\model\Modelapple.java:29: error: cannot find symbol public static TexturedModelData getTexturedModelData() {
^
symbol: class TexturedModelData
location: class Modelapple
C:\Users\Lautaro\Desktop\mods\src\main\java\net\mcreator\tinyfriends\client\model\Modelapple.java:48: error: cannot find symbol public void render(MatrixStack matrices, VertexConsumer vertexConsumer, int light, int overlay, float red, float green, float blue, float alpha) {
^
symbol: class MatrixStack
location: class Modelapple
2 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 2s
1 actionable task: 1 executed

BUILD FAILED

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Either something's wrong…
Wed, 10/25/2023 - 02:21

Either something's wrong with the model itself, (you're missing some files, or the files themselves are corrupted), or you're using a snapshot version of Geckolib that isn't fully compatible with the latest version of MCreator, would be my guess. If you're only getting two compilation errors, (and you have other geckolib models that are working), it's probably just the apple model that's broken. 

It says it can't find the 'Matrix Stack' and 'Textured Model Data' in 'Modelapple.' I haven't encountered this specific error before, but I would recommend trying to redownload and reupload the files from blockbench, unlock any locked mod elements related to this, and see if that helps. 

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
tysm, i think i will redo…
Wed, 10/25/2023 - 03:15

tysm, i think i will redo the model because i have already tried every other option.

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i recreated the whole model…
Wed, 10/25/2023 - 03:52

i recreated the whole model and texture, but it still doesnt work, i dont know what to do

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I assume you've tried…
Wed, 10/25/2023 - 03:59

I assume you've tried regenerating the code and clearing the caches?

You could also try making duplicates of the broken elements, (with different names), and see if they also yield build errors. (This regenerates the code of the original element, which might fix the issue.) If it doesn't, then there's likely something more serious with the elements themselves that's causing the problem.

It might also be a duplicate of another model file, if you didn't change the 'model identifier' in the project tab of blockbench. If overwriting the old elements and stuff with new versions doesn't fix it, it's possible the code isn't being regenerated properly, in which case regenerating the caches might help. (There's a good explanation of how to do this in the troubleshooting page of the MCreator knowledge base.)

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you all, i could solve…
Wed, 10/25/2023 - 17:26

thank you all, i could solve it by remaking the mod. It wasnt very hard because I had just started making it