Started by
TDO
on
Topic category: Help with MCreator software
I created a custom Geckolib model with custom animations. but it causes the build to fail. heres the Build log :
> Task :compileJava
C:\Users\onyxl\MCreatorWorkspaces\tdos_additional_features\src\main\java\net\mcreator\tdosadditionalfeatures\entity\PhoenixEntity.java:311: error: cannot find symbol
(entityType, world, reason, pos, random) -> (world.getBlockState(pos.below()).getMaterial() == Material.GRASS && world.getRawBrightness(pos, 0) > 8));
^
symbol: method getMaterial()
location: class BlockState
C:\Users\onyxl\MCreatorWorkspaces\tdos_additional_features\src\main\java\net\mcreator\tdosadditionalfeatures\entity\PhoenixEntity.java:311: error: cannot find symbol
(entityType, world, reason, pos, random) -> (world.getBlockState(pos.below()).getMaterial() == Material.GRASS && world.getRawBrightness(pos, 0) > 8));
^
symbol: variable GRASS
location: class Material
C:\Users\onyxl\MCreatorWorkspaces\tdos_additional_features\src\main\java\net\mcreator\tdosadditionalfeatures\entity\PhoenixEntity.java:329: error: cannot find symbol
if (!this.isOnGround()) {
^
symbol: method isOnGround()
C:\Users\onyxl\MCreatorWorkspaces\tdos_additional_features\src\main\java\net\mcreator\tdosadditionalfeatures\entity\PhoenixEntity.java:343: error: level has private access in Entity
this.lastSwing = level.getGameTime();
^
C:\Users\onyxl\MCreatorWorkspaces\tdos_additional_features\src\main\java\net\mcreator\tdosadditionalfeatures\entity\PhoenixEntity.java:345: error: level has private access in Entity
if (this.swinging && this.lastSwing + 7L <= level.getGameTime()) {
Are you using the latest snapshot version of Geckolib for 1.20? A lot of the calls it's using are outdated for some reason and don't work, meaning some animation types will cause build errors unless you manually lock and fix the elements.
I've seen some of these before; "this.isOnGround" should be replaced with "this.onGround," and any mention of "level" should be replaced with "level()". I'm not sure about the first two.
You may want to try making a regular entity element and examining the code to see what's changed in the latest version; this is how I figured out which of Geckolib's functions weren't working. But yeah, it's annoying, and it doesn't look like the plugin's going to be updated for awhile. Best of luck.
@Mindthemoods thanks i think it'll help me a lot.
@Mindthemoods
I FINALLY GOT IT TO WORK
Thanks a lot
The fact that Geckolib isn't updated is so anoying bruh wth
Btw thanks Have a great day
Mindthemoods Fnck it It builds properly but now whenever i launch the game it crashes instantly... I think im gonna burst my desk into ashes, but still thanks though
There can still be game crashing issues even if the code is compiling- procedures that loop endlessly, entity checks that don't actually return an entity, that sort of thing. What is the error message when the game crashes? There are other solutions you could try.
Mindthemoods it tells me that
this.lastSwing = level.getGameTime();
andif (this.swinging && this.lastSwing + 7L <= level.getGameTime()) {
are private, but as you can see i already set it public.Try replacing the 'level' in 'level.getGameTime' with 'level(),' if it's these lines specifically that are referenced in the error log.
That was fixed in the latest patches.
It is indeed! Thanks a bunch @Nerdy, this fixes a lot of trouble I was having with locked code! @TDO, I've tried the latest version of Geckolib, and it works just fine with unlocked mod elements in 2023.3.
I'm having the same problem. I'm using blockbench to model with the plugin version 3.0.7 while both McCreator (2023.4) and the geckolib plugin (5.4.3) are at their latest version. I followed the instructions step by step but i keep getting tons of errors of the kind "cannot find symbol" and some others. I've tried to understand why for the last couple of days while browsing for answers but all in vain. My model and my animations should work well, the animations names are the same as they are called in McCreator. I've read that the limbs in blockbench should be named in lowercase and should not have spaces between words so i changed that. I need help.