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
@JaBaconator - Awesome, great news.
Thank you so much for this code, it has been really helpful, but unfortunately, this no longer works on version 2023.3, would you be able to update it to this version? I would try and figure it out myself but I don't know Java. Thank you!
@PhatBoi6841
I just tested it in 2023.3 (Forge 1.20.1) ... works with no issues. Same as before, paste this code right before the last }
Also, don't forget to lock the code after saving the changes. Have fun!
You're right it works just fine, I don't know what was wrong with it when I tired and it didn't work, I know there was a tiny mcreator update that came out within the last couple days, I wonder if that was the issue, but either way thank you for the reply and support!
@PhatBoi68419
There are lots of changes on every update, Forge changed a lot of things for this new version. Anyways, glad it works. If you or anyone else experiences issues on future updates ... let me know, I will do my best to help. By the way, this code also works if you are creating Geckolib animated armors.
Well, happy modding.
can you please give us an example on where to put it i am so confused trying to get this to work
this procedure will add fire work functionallity whenever the procedure is ran. i have it hooked up to a keybined
Dratic95
The example is in the first gif ...
If you still have doubts, watch the following ...
Sorry, but for your second post ... the image is cannot be seen/found.
That is great, I took the liberty of reposting it ... making it visible here (in MCreator site).
Double checking your suggestion, it will work for any elytra flying. It could possibly be adjusted adding ...
&& {this-armor on chest}
yes. i only made this in like five minutes for my blue beetle mod i am working on right now. the blue beetle mod give you the ability to elytra fly when you have the scarab equiped. i just made an adjustment so it only worked when the scarab was active. also they reason it is multiplied by 2 is when you do it with out the multiplacation on just the base it moves you forward about half a block
You said that this works on geckolib animated models, can you make a quick tutorial?, because it doesn't weem to work for me
I have a issue how can i get this to work server side? It works fine client side. Im using 2023.1 btw.