2020.4 How to make a rideable entity fly by pressing on a key

Started by MonochromEND on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
2020.4 How to make a rideable entity fly by pressing on a key

Hi everyone it's my first mod and i want to create airships that you can control like a boat but with a twist that i can't seem to apply to a rideable entity ^^'

(P.S : sry for english mistakes i'm french)

 

SO on what i was able to do :

With the code below, i can make the player move like i want, which is going up and down, and rotate the view left and rigth (mouse does not work to rotate which is intended) with the arrow keys.

 https://drive.google.com/file/d/1cSskjDeAor2vYwKXSnFLKjpSPn6IMf66/view?…

For the airship i tried to place it in the trigger OnTickUpdate with a condition if the entity is beeing is ridden and it didn't worked.

I also tried some other mishaps, but nothing worked.

But i identified maybe a way to resolve the problem but i'm still not experienced enough in C and Forge to make it.

https://drive.google.com/file/d/1Ba3aEB1D0lxqNILzpK9OY833oaMvyvSB/view?…

If i could modify the Y coordinate of the Vec3D with my global variables VERTICAL and HORIZONTAL (see in the last code). I'm pretty sure it would work.

 

Now if someone can help me on this problem it would be really kind of him :)

Have a nice day envening or whatever and keep it up with every thing you are working on :D

 

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nice! i want to see your…
Tue, 08/18/2020 - 01:07

nice! i want to see your ships :)

Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you send me the…
Sun, 10/18/2020 - 01:28

Can you send me the procedures?

Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
would you be willing to post…
Sun, 12/20/2020 - 02:12

would you be willing to post a picture of the layout for the trigger on how to get sounds playing when flying .  you would be my hero

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@gustavowizard123 in this…
Tue, 12/07/2021 - 21:11

@gustavowizard123

in this picture, where is the block that is the "Set movement vector to vx:" etc. block, i can't find it anywhere

asw