Started by
SilentStarling
on
Topic category: Advanced modding
I am trying to make a procedure to allow the aging of a baby mob into an adult mob, while transferring all of the information from the baby entity to the adult entity. So far it is transferring the health and name properly, but I cannot get it to transfer ownership. Meaning, I am trying to tame the adult mob to the same person the baby mob is tamed to, if any. I tried using the "tame x by y" procedure, with X being the adult entity and Y being "get owner of baby entity if tamed". I get the following console errors from this:
> Task :compileJava
D:\MocTest\src\main\java\net\mcreator\mocreatures\procedures\TurtleGrowProcedure.java:101: error: cannot find symbol && (((entity instanceof TameableEntity) ? ((TameableEntity) entity).getOwner() : null) instanceof PlayerEntity)) {
^
symbol: variable entity
location: class net.mcreator.mocreatures.procedures.TurtleGrowProcedure
D:\MocTest\src\main\java\net\mcreator\mocreatures\procedures\TurtleGrowProcedure.java:101: error: cannot find symbol && (((entity instanceof TameableEntity) ? ((TameableEntity) entity).getOwner() : null) instanceof PlayerEntity)) {
^
symbol: variable entity
location: class net.mcreator.mocreatures.procedures.TurtleGrowProcedure
D:\MocTest\src\main\java\net\mcreator\mocreatures\procedures\TurtleGrowProcedure.java:103: error: cannot find symbol ((TameableEntity) adult).setTamedBy((PlayerEntity) ((entity instanceof TameableEntity) ? ((TameableEntity) entity).getOwner() : null));
^
symbol: variable entity
location: class net.mcreator.mocreatures.procedures.TurtleGrowProcedure
D:\MocTest\src\main\java\net\mcreator\mocreatures\procedures\TurtleGrowProcedure.java:103: error: cannot find symbol ((TameableEntity) adult).setTamedBy((PlayerEntity) ((entity instanceof TameableEntity) ? ((TameableEntity) entity).getOwner() : null));
^
symbol: variable entity
location: class net.mcreator.mocreatures.procedures.TurtleGrowProcedure
4 errors
> Task :compileJava FAILED
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 18s
1 actionable task: 1 executed
BUILD FAILED
I made sure both entities are set to tameable in the AI tab, and they are. So I'm not sure what the error is coming from or how to fix it. Any ideas?
ive read it 4 times and still have no idea