Started by
WizzardTV
on
Topic category: Help with modding (Java Edition)
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
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)
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!
You're welcome