Flying mobs idle at random intervals

Started by GooseWeirdLol on Mon, 06/21/2021 - 20:22

Topic category: Help with modding (Java Edition)

Last seen on 19:48, 19. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Flying mobs idle at random intervals
Mon, 06/21/2021 - 20:22

I've been making a flying dragonfly-esque mob (as the title suggests), and upon putting it in the game, it works fine, but it has a small bug; it idles/stays still at random intervals, like a land mob would. Any way to fix this and give it perpetual flight without stopping, e.g. using a procedure/changing the AI/goals or editing the mobs code altogether, even if I have no knowledge in that kinda stuff?

And yes; I've seen a post documenting this on the forum before, but the solution doesn't fix the problem, just causes build errors. Not to worry, I've reversed the method to it's original state and everything's back to normal, including the 'ol bug. Plus, the post is over a year old. :P

And no, I apparently can't submit tickets yet because I don't have the "permissions" to do so, so I'll have to post it here. I'm making decent progress on the mod, if you're curious. It's just this mob I'm a bit stuck on.

If you want me to send anything your way (videos, mob information), don't hesitate to gimme a nudge.

If you come up with any solution, I'll thank you a bunch!

Last seen on 13:33, 24. Jul 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
hm... personally, I found…
Mon, 06/21/2021 - 23:15

hm... personally, I found that using the bat entity AI base causes a flying mob to fly constantly without landing on a block or randomly getting idle! i even used that workaround for a bug entity called "sporebug" on my mod Upon Infernal Depths, and it works like a charm (hopefully it will also work for you!) give it a shot :)

Last seen on 13:33, 24. Jul 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
if you get any build errors…
Mon, 06/21/2021 - 23:18

if you get any build errors with using it that you're not sure how to fix, let me know!

Last seen on 19:48, 19. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you very much! I'll go…
Tue, 06/22/2021 - 02:39

Thank you very much! I'll go try that now. I'll let you know if anything happens.

Last seen on 19:48, 19. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Got myself a build error,…
Tue, 06/22/2021 - 02:50

Got myself a build error, here's what went wrong:

C:\Users\CurranPC\MCreatorWorkspaces\my_first_mod_look_guys\src\main\java\net\mcreator\myfirstmodlookguys\entity\MeganauraEntity.java:97: error: incompatible types: CustomEntity cannot be converted to CreatureEntity 
         this.goalSelector.addGoal(1, new RandomWalkingGoal(this, 1.5, 20) { 
                                                            ^ 
C:\Users\CurranPC\MCreatorWorkspaces\my_first_mod_look_guys\src\main\java\net\mcreator\myfirstmodlookguys\entity\MeganauraEntity.java:97: error: cannot find symbol 
         this.goalSelector.addGoal(1, new RandomWalkingGoal(this, 1.5, 20) { 
                                      ^ 
  symbol: constructor (CustomEntity,double,int) 
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 
2 errors

Anything I can do to solve this?

Last seen on 13:33, 24. Jul 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
ah, i'm assuming you put …
Tue, 06/22/2021 - 03:27

ah, i'm assuming you put "wander around with speed factor [x]" under your entity's AI tasks. you should remove it now, since you're now basically extending your entity behavior from bats, and bats don't walk randomly so that task is unsupported

Last seen on 19:48, 19. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I'll go do check if I have…
Tue, 06/22/2021 - 03:53

I'll go do check if I have it, and if I do, I'll remove it. Thanks again!

Last seen on 19:48, 19. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Turns out I did not. I…
Tue, 06/22/2021 - 04:00

Turns out I did not. I removed something else that I figured was mucking the process up, and I still get the build error.

Here's the AI tasks for reference, top to bottom:

Fly around with speed factor (x)
Look around
Swim/float when in water
Leap at target entity with speed factor (x)

Any of these causing problems?

Last seen on 13:33, 24. Jul 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
ohhh, now i found the issue!…
Tue, 06/22/2021 - 04:35

ohhh, now i found the issue! just remove "fly around with speed factor (x)", as the bat AI base already provides its own flight controller if I'm correct. once you remove that, your AI task list will also look similar to mine, which works :D

Last seen on 19:48, 19. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Will do! Thanks once again!
Tue, 06/22/2021 - 05:44

Will do! Thanks once again!

Last seen on 19:48, 19. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It finally worked! I'll be…
Tue, 06/22/2021 - 05:50

It finally worked! I'll be sure to save this for future reference, if this ever has another use.

Last seen on 13:33, 24. Jul 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
good to hear! you're welcome…
Tue, 06/22/2021 - 06:05

good to hear! you're welcome :)

Last seen on 19:48, 19. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Seems have I like another…
Wed, 06/23/2021 - 02:07

Seems have I like another thing on my hands. The mobs seem to stick to the ceiling once it comes in contact with such ceiling. Other than that, everything's in working order. Know a fix?

Last seen on 13:33, 24. Jul 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
probably no easy fix for…
Wed, 06/23/2021 - 02:25

probably no easy fix for that and idk of any fix using code either... that also happens in my case :|

i hope it's not that big of an issue for you though! there could've been a possibility where i told you to make your own flight controller & path navigator then use it for your mob instead of simply extending your entity from bat's behavior (which you're doing for the mob rn) or using MCreator's kinda funny built-in flight controller (which causes flying mobs to be idle and/or have such weird movement), but that's way more complicated to make... and as i said, it's a workaround but sadly it ain't perfect...

Last seen on 19:48, 19. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Alrighty! Thanks for trying!
Wed, 06/23/2021 - 02:36

Alrighty! Thanks for trying!