Topic category: User side tutorials
I tried to make it as simple as possible, it does require to lock the code.
- Create your default or custom 3d armor
- Modify the desired settings
- Save
- Now lock the code
- 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
@Visa - This is how I did it. Just look at the
//ENABLE ELYTRA FLYING
@Max10tails - I never had an issue playing in a server, usually the mod has to be in the server and in the client.
could you add a tutorial on how to get this to work so it has wings when in air
does this work with 3d modle armor?
Yes ... That is the entire code for a Geckolib 3d armor, including how to enable the elytra flying, and how to trigger the armor animations with:
The code is the entire tutorial, you only need to:
It also has a regeneration effect (or you could assign a different or custom effect) while wearing the full set. Or just remove it.
Does work for 1.19.4? Because the armor doesnt compile correctly.
@ valencian
That code is for a Geckolib armor. Just generate the code with MCreator and then add at the bottom ...
If you decide to copy/paste it, then you will need to figure out what is causing the error in your project.
Maybe the class name, or the animations I added based on a custom shield on hand ... not sure.
Oh, I forgot to say that i figured out the issue, anyways thanks!
error: cannot find symbol
code for mcreator 2013.3 please
https://imgur.com/hfHfjal
Did you just posted MCreator 2013.3 ...? I think it was for 1.6
Which MCreator version are you using? Post a screenshot of the version
For which Minecraft version is the armor for?
Please show the entire code (not just the error) in order to possibly help you better.
Ok, so possibly you had a typo with the version ...
I just double-checked the code and found a slight change for 2023.3.
It had a change from:
to:
Updated code:
Also, double check the imports (at the top fo the code):