[TUTORIAL] Making a flying armor 2022.x - Forge 1.18.2 - Look at the comments for updates up to 2023.x 1.20.1

Started by __SK__ on

Topic category: User side tutorials

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] Making a flying armor 2022.x - Forge 1.18.2 - Look at the comments for updates up to 2023.x 1.20.1
Sat, 05/04/2024 - 01:18 (edited)

I tried to make it as simple as possible, it does require to lock the code.

  1. Create your default or custom 3d armor
  2. Modify the desired settings
  3. Save
  4. Now lock the code
  5. Copy the following and paste it right before the last "}" in the code

 

    

   @Override
   public boolean canElytraFly(ItemStack stack, net.minecraft.world.entity.LivingEntity entity) {
      return true;
   }

   @Override
   public boolean elytraFlightTick(ItemStack stack, net.minecraft.world.entity.LivingEntity entity, int flightTicks) {
      if (!entity.level.isClientSide) {
         int nextFlightTick = flightTicks + 1;
         if (nextFlightTick % 10 == 0) {
            if (nextFlightTick % 20 == 0) {
               stack.hurtAndBreak(1, entity, e -> e.broadcastBreakEvent(net.minecraft.world.entity.EquipmentSlot.CHEST));
            }
            entity.gameEvent(net.minecraft.world.level.gameevent.GameEvent.ELYTRA_FREE_FALL);
         }
      }
      return true;
   }

=============SPECIAL NOTE================

    If needed set stack.hurtAndBreak from 1 (default value - breakable) to 0 (unbreakable)

=============SPECIAL NOTE================

 

Congratulations, now your armor (chestplate) will act just like an elytra ... and still have armor properties.

If you still have doubts, watch the following ...

NOTE: Apologies for the image hosting issues, one of my server admins decided to rearrange the content in it causing mapping issues.

Please ... (right click and save for future reference)

Results ...

Take off

Landing

With some creativity you could add a tick to the chestplate ... adding an additional chestplate that will switch while in air for a winged model, making it cool and more enjoyable to watch.

 

I would gladly like to see screenshots of your creations.

Have fun

Edited by __SK__ on Sat, 05/04/2024 - 01:18
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Are where I found model of…
Thu, 11/24/2022 - 09:29

Are where I found model of vannila elytra armor model? 

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unfortunately, I have not…
Thu, 11/24/2022 - 16:54

Unfortunately, I have not seen any site where you can download premade 3d elytra models. Mostly I google search for wings images and/or robot wings characters to find inspiration for my wing models. 

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey, is it possible to use…
Sun, 01/22/2023 - 17:09

Hey, is it possible to use it without armor, im making a mod where the player can fly in survival(not using creative fly cuz its wack), i already have the procedure, i just want the player to use the elytra flying animation. 

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry for the delayed answer…
Wed, 02/15/2023 - 22:39

Sorry for the delayed answer, initially I tried with an item in main hand ... but it did not work. Will take a look into it.

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright, sorry for the late…
Wed, 03/08/2023 - 21:22

Alright, sorry for the late reply too

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, it doesn't work well, I…
Thu, 03/23/2023 - 15:47

Hi, it doesn't work well, I don't know why, could you help me?

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nothing, I fixed it, forgot…
Thu, 03/23/2023 - 15:55

Nothing, I fixed it, forgot it

 

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you make the armor code…
Thu, 07/06/2023 - 19:28

Can you make the armor code doesn't need fireworks? I mean can fly itself?

Just asking 😁

Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm making an armor right…
Sat, 07/29/2023 - 15:46

I'm making an armor right now, but I don't want to use fireworks all the time on that armor, do you have a chance to make a model that goes at the same speed all the time?

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey! I've found your code,…
Mon, 08/21/2023 - 22:50

Hey! I've found your code, and I have a question. Do you need the whole armor set for your code to work? I'm trying to do it with just a chestplate, and there's no errors, but when I try to fly like with an elytra, I don't fly, I just fall.

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello again, so I found the…
Tue, 08/22/2023 - 14:35

Hello again, so I found the issue. It won't save the code everytime I enter the code and save it.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey! I've found your code,…
Wed, 08/23/2023 - 00:53

Hey! I've found your code, and I have a question. Do you need the whole armor set for your code to work? I'm trying to do it with just a chestplate, and there's no errors, but when I try to fly like with an elytra, I don't fly, I just fall.

 

Sorry ... It has been a long time without working with this type of elytra armor. I will have to recreate/test it in order to figure out the issue.

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I got it to work! I used the…
Thu, 08/24/2023 - 19:48

I got it to work! I used the newer one. The other one had given me an error, hence why it wouldn't save! TYSM!!!