How to prevent entities flying too high?

Started by Eggysandwiches on

Topic category: Help with modding (Java Edition)

Last seen on 09:49, 15. Sep 2023
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to prevent entities flying too high?

I have several flying entities but most of them fly too high in the sky to be useful, and some move with ridiculous velocities if they touch the ground as well. How do I stop this?

Last seen on 01:07, 21. Nov 2022
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I too would like to know
Tue, 12/14/2021 - 07:42

I too would like to know

Last seen on 15:24, 24. Apr 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if y>= number you want then…
Tue, 12/14/2021 - 08:07

if y>= number you want then set entity location to y number you want

Last seen on 09:42, 5. Sep 2023
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could make the entity in…
Tue, 12/14/2021 - 09:38

You could make the entity in blockbench not on the ground and make the wings a constant  motion. Thus not making it a flying entity but still looking like one. The bad thing is it wont fly below or above.

Last seen on 14:46, 22. Jan 2022
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make This:  If Y > 100 Then…
Tue, 12/28/2021 - 15:14

Make This: 

If Y > 100 Then Vector Y =  -80.

Or Something Like

Last seen on 01:58, 4. Feb 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Place in on entity tick…
Thu, 02/01/2024 - 02:58

Place in on entity tick update.

IF [Y position of event/target entity > [Get World surface height at [X: X position of event/target entity], [Z: Z position of Event/target entity + 26]] (or whatever height you want your max limit)

DO [Attempt to make Event/target entity find path and move to [X: X position of event/target entity], [Y: Y position of event/target entity - 8] (or however much you want your mob to drop), [Z: Z position of event/target entity with speed factor of 1]](or however fast you want him to drop)

It worked for me.