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
Great tutorial!
Thanks.
Nice
You're the goat I needed this exact thing for one of my mods and just happened across it rn.
Thanks.
This was SO helpful, thanks!
Doesn't work, but it might just be because its on the most recent snapshot.
Once copied and pasted in it shows up with this.
https://imgur.com/LVVKJIy
The code slightly changed ... the following goes before the last "}" in the code.
For MCreator EAP 2022.3 b41417 ONLY
Much appreciated!
Are how do I make an elytra item controller the firework for example?
@Zavgar4
Never tried it, but it basically will require a YourCustomRocketEntity and YourCustomRocketItem classes extending FireworkRocketEntity and FireworkRocketItem classes.
Once created go inside YourCustomRocketItem (which needs to look for the entity), now you need to add the following lines pointing to your custom rocket which Overrides the default rocket.
And inside the YourCustomRocketEntity
The code requires a lot more, but these parts are needed for the fall flying/elytra flying. I am using IntelliJ to modify the code. It is possible, but complicated.
Are how I make a elytra acceleration item for elytra example:firework
Thanks! But where I found the model for vannila elytra?
And where I write this code? Inside elytra item are make new item and entity and write this code?