Unable to spawn mob, code says

Started by Faydflowright on

Topic category: Help with modding (Java Edition)

Last seen on 19:46, 10. Mar 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unable to spawn mob, code says

I've got another issue... I FINALLY figured out how to make a entity spawn with animations (took a bit of trial and error but figured it out!) but now it won't spawn cuz of the below text error. Originally, it said that "Material.GRASS" was the problem as the entity was supposed to spawn in the Badlands, so I changed it to "Material.ORANGESAND"... still getting the error though.

Any ideas what may be going on? THANKS MUCH!!

 

Executing Gradle task: runClient 
Build info: MCreator 2023.3.36712, forge-1.20.1, 64-bit, 65156 MB, Windows 11, JVM 17.0.7, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2023-09-18-11:54:39 
  
> Task :compileJava FAILED 
C:\Users\Alex\MCreatorWorkspaces\faycraft\src\main\java\net\mcreator\faycraft\entity\Cacti2Entity.java:142: error: cannot find symbol 
            (entityType, world, reason, pos, random) -> (world.getBlockState(pos.below()).getMaterial() == Material.ORANGESAND && world.getRawBrightness(pos, 0) > 8)); 
                                                                                         ^ 
  symbol:   method getMaterial() 
  location: class BlockState 
C:\Users\Alex\MCreatorWorkspaces\faycraft\src\main\java\net\mcreator\faycraft\entity\Cacti2Entity.java:142: error: cannot find symbol 
            (entityType, world, reason, pos, random) -> (world.getBlockState(pos.below()).getMaterial() == Material.ORANGESAND && world.getRawBrightness(pos, 0) > 8)); 
                                                                                                                   ^ 
  symbol:   variable ORANGESAND 
  location: class Material 
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 1s 
1 actionable task: 1 executed 
  
BUILD FAILED 
Task completed in 3 seconds
If you are using this for 1…
Mon, 09/18/2023 - 17:08

If you are using this for 1.20.x, there is no such thing as materials in this version anymore

Last seen on 19:46, 10. Mar 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you are using this for 1…
Mon, 09/18/2023 - 17:28

If you are using this for 1.20.x, there is no such thing as materials in this version anymore

huh okay, so why is the code still generating and causing the error? Do I need to remove it? @klemen

Last seen on 19:46, 10. Mar 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
update.... I found out that…
Mon, 09/18/2023 - 21:17

update.... I found out that this is due to the "spawning" screen in the Animated Entity section of MCreator, which is a Geckolib feature.

So that's good to know, it's a Geckolib problem. However, should the code be deleted? Or should I add a regular "Living Entity" and then add "Procedures" that register the Geckolib model/animations?

This is a bug in geckolib…
Tue, 09/19/2023 - 16:02

This is a bug in geckolib plugin that seems very buggy in 1.20.1. The best would be to contact the plugin author as I can't offer support for 3rd party plugins

Last seen on 15:46, 30. Dec 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm getting this problem too…
Thu, 11/23/2023 - 21:41

I'm getting this problem too, is there any solution as of now or none?