[SOLVED] Help with Flying Entity Behavior

Started by WizzardTV on

Topic category: Help with modding (Java Edition)

Last seen on 04:46, 24. Jul 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] Help with Flying Entity Behavior
Tue, 07/23/2024 - 22:06 (edited)

I am attempting to create a modded entity on java (version 1.20.1 in MCreator build 2024.2) and I am wondering about how or if specific behaviors would be possible to add to the mob I am creating.
Namely: I wish to make it so that while said mob is flying, it will try to maintain an altitude of around 70-100 blocks above the ground beneath it, similar to how Phantoms maintain an altitude circling overhead before striking the player.
I have searched for and have yet to see any forum posts with contents similar to this, so apologies if I have missed any previous posts detailing what I am looking for.

Edited by WizzardTV on Tue, 07/23/2024 - 22:06
Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://imgur.com/JR9s95W …
Sat, 07/20/2024 - 02:04

https://imgur.com/JR9s95W 

this is a procedure I used in one of my mods to make a flying entity not go too high, In my case it works really well, but I'm sure that for a different kind of mod it could not work properly, try it out (change some numbers to make it work better for you)  

Last seen on 04:46, 24. Jul 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tweaking some numbers and…
Sat, 07/20/2024 - 04:30

Tweaking some numbers and changing the "if block under entity is the same block as air" to have a "is false" at the end made this work perfectly for what I was looking for, thank you so much!

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You're welcome 
Sat, 07/20/2024 - 10:13

You're welcome