Big nono here! The ghast code is pretty cheap. It has zero intelligent yet, I don't know why they still haven't made any AI for the nether mobs, Withers and now also pigmen (which also took away too long to add existing code to them) are the only nether creatures with AI.
You can easily copy the entityhorse's code, and to make it flyable by either use jump/sneak or the rotationyaw of the player, when the player is looking up, you make the ridden entity ascent , and it's looking down, your ridden entity will of course descent until it hits the ground.
I agree but it seems to be the easiest way out. Just a quick question, is there a reason you think that? Prior experience or something?
Actually it is not ´the easiest way out´. The ghast has the same intelligence as squids, none. It moves towards 1 random direction for x random ticks. which will make your entity not controllable, because it will try to force your entity to that random direction, this can be blocked by the user's input but it will make your entity jittery. Also it will randomly ascent and descent, which can place the player into the wall or in to lava or what ever.
how do i make the mob ascend/descend by looking up and down? Here is code though it only works when you turn the mouse sideways, it goes up when you move it right, and down when you move the mouse left
public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_)