Entity causing compilation error

Started by SHORT on

Topic category: Help with MCreator software

Last seen on 15:51, 5. Mar 2024
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Entity causing compilation error
Fri, 05/14/2021 - 20:31 (edited)

Im using Portable Mcreator, version 2021.1.12313.

So, idk whats wrong, i tried create a invisible entity, but doesnt worked. At first I think it was a texture, but when I put one of the minecraft it didn't work anyway.

I left prints of each page of creation of the entity and the code in java.

 

Visual and Sound | No Sound*

Behavior | Immune to everything*

Particles

Inventory

Triggers

AI and Goals

Spawning


 

Executing Gradle task: build
Build info: MCreator 2021.1.12313 EAP (12313), forge-1.16.5, 64-bit, 4004 MB, Windows 8.1, JVM 1.8.0_275, JAVA_HOME: C:\Users\Enzo\Desktop\MCreatorEAP20211b12313\jdk
> Task :compileJava FAILED
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:132: error: registerAttributes() in CustomEntity cannot override registerAttributes() in LivingEntity protected void registerAttributes() {
^
overridden method is static
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:131: error: method does not override or implement a method from a supertype @Override
^
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:134: error: cannot find symbol if (this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED) != null)
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:135: error: cannot find symbol this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0);
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:136: error: cannot find symbol if (this.getAttribute(SharedMonsterAttributes.MAX_HEALTH) != null)
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:137: error: cannot find symbol this.getAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(1);
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:138: error: cannot find symbol if (this.getAttribute(SharedMonsterAttributes.ARMOR) != null)
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:139: error: cannot find symbol this.getAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(0);
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:140: error: cannot find symbol if (this.getAttribute(SharedMonsterAttributes.ATTACK_DAMAGE) == null)
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:141: error: cannot find symbol this.getAttributes().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE);
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:141: error: cannot find symbol this.getAttributes().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE);
^
symbol: method getAttributes()
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:142: error: cannot find symbol this.getAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(0);
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:143: error: cannot find symbol if (this.getAttribute(SharedMonsterAttributes.FLYING_SPEED) == null)
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:144: error: cannot find symbol this.getAttributes().registerAttribute(SharedMonsterAttributes.FLYING_SPEED);
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:144: error: cannot find symbol this.getAttributes().registerAttribute(SharedMonsterAttributes.FLYING_SPEED);
^
symbol: method getAttributes()
C:\Users\user\MCreatorWorkspaces\freyjamod\src\main\java\net\mcreator\freyjamod\entity\ChunkBlockEntity.java:145: error: cannot find symbol this.getAttribute(SharedMonsterAttributes.FLYING_SPEED).setBaseValue(0);
^
symbol: variable SharedMonsterAttributes
location: class CustomEntity
16 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 6 secondsExecuting Gradle task: build

 

Edited by SHORT on Fri, 05/14/2021 - 20:31
This is kinda strange, would…
Sat, 05/15/2021 - 07:08

This is kinda strange, would you mind attaching a workspace zip (eg. put it on Mediafire and link it here)? Thanks!

Last seen on 15:51, 5. Mar 2024
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, sorry, i fixed it. In…
Sat, 05/15/2021 - 16:15

Oh, sorry, i fixed it. In fact, I deleted the mcreator folder (portable), uninstalled jdk 11 java and installed the most current jre 8, then reinstalled mcreator in version 2021.1 and it worked!

Last seen on 15:51, 5. Mar 2024
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wait please, it happened…
Sun, 05/16/2021 - 03:52

Wait please, it happened again, so i uploaded my workshop here 

I have imported the…
Sun, 05/16/2021 - 08:24

I have imported the workspace and it built and ran for me. Try clearing gradle caches once more to see if it helps

Last seen on 15:51, 5. Mar 2024
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How i clear gadle cache?
Sun, 05/16/2021 - 15:44

How i clear gadle cache?

The solution to this problem…
Sun, 05/16/2021 - 17:38

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.

Last seen on 14:57, 18. Apr 2024
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is an issue caused by…
Sun, 08/22/2021 - 00:22

This is an issue caused by having the geckolib plugin installed, as it modifies the mob attributes to be the ones from 1.15.2. Please delete the plugin