Gradle build failed because of custom models

Started by Hawksha on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Gradle build failed because of custom models

So im designing custom models and added them into mcreator but theyre causing my gradle build to fail

Executing Gradle task: runClient 
Build info: MCreator 2022.1.20510, forge-1.18.2, 64-bit, 8110 MB, Windows 10, JVM 17.0.1, JAVA_HOME: D:\MCreator\jdk, started on: 2022-08-11-20:51:45 
  
> Configure project : 
The code of this workspace uses official obfuscation mappings provided by Mojang. These mappings fall under their associated license you should be fully aware of. 
(c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, 
but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. 
Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available 
at https://account.mojang.com/documents/minecraft_eula. 
  
> Task :compileJava FAILED 
C:\Users\loren\MCreatorWorkspaces\dungeonsreborn\src\main\java\net\mcreator\dungeonsreborn\client\model\ApexEndermen.java:22: error: class apex_endermen is public, should be declared in a file named apex_endermen.java 
public class apex_endermen<T extends Entity> extends EntityModel<T> { 
       ^ 
C:\Users\loren\MCreatorWorkspaces\dungeonsreborn\src\main\java\net\mcreator\dungeonsreborn\client\model\EnderMonarch.java:22: error: class ender_monarch is public, should be declared in a file named ender_monarch.java 
public class ender_monarch<T extends Entity> extends EntityModel<T> { 
       ^ 
C:\Users\loren\MCreatorWorkspaces\dungeonsreborn\src\main\java\net\mcreator\dungeonsreborn\client\model\ShieldSpiritModel.java:21: error: class custom_model is public, should be declared in a file named custom_model.java 
public class custom_model<T extends Entity> extends EntityModel<T> { 
       ^ 
C:\Users\loren\MCreatorWorkspaces\dungeonsreborn\src\main\java\net\mcreator\dungeonsreborn\client\model\TheEnderWrecker.java:21: error: class unknown is public, should be declared in a file named unknown.java 
public class unknown<T extends Entity> extends EntityModel<T> { 
       ^ 
4 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 4 seconds 
  

anybody know a fix?

The solution to this problem…
Fri, 08/12/2022 - 10:59

The solution to this problem and many other problems can be found in our knowledge base: https://mcreator.net/support/knowledgebase Please check the knowledge base before opening a new topic on the issue which has a known fix.

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Followed all solutions and…
Wed, 11/29/2023 - 18:57

Followed all solutions and still get this error with java models