Elytra Jet Pack plugin

Discussion in 'Plugin Requests' started by Jamesol1, May 12, 2018.

Thread Status:
Not open for further replies.
  1. Offline


    Minecraft version: 1.12.2 +

    Suggested name: Elytra Jet Pack

    What I want:
    A plugin that would allow the elytra to function as a sort of jetpack. The flight would be the standard elytra flight powered with fireworks (but i would like the speed to be a fair bit slower if possible).

    A custom lever of which players would create upon right clicking would perform the same action fireworks do while flying with an elytra, but it would also (when on the ground) perhaps through left click... launch the player into the air. There would be a crafting recipe for the lever, it would pretty much be an in game lever with an enchanted glow with the item renamed to something such as 'launch lever'.

    Asthetics wise I would retexture the elytra to a sci-fi looking set of wings. But Id' need the elytra flight to have particles following the player (think dark smoke looking particles) and with the launching into the air (upon left clicking while on the ground) to be followed with white cloud particles.

    What this plugin is...
    Changing the method of consuming fireworks to power the elytra into a lever that would do this but also allow players to launch in the air to start their flight. Ideally... i'd like elytras to have a fuel system requiring coal or charcoal etc. If possible I'd like for the flight to be slower (maybe this can be achieved just through adding a slowness III buff when flying with the item)... jet packs aren't super fast so yeah.

    Ideas for commands:
    /jp give jetpack

    Ideas for permissions:

    Thanks for reading, ask me for more details. Apologies if i didn't explain this well.
    Last edited by a moderator: May 12, 2018
  2. Offline


    I like this idea. I mean it is a plugin fitting the skill of an "simple" coder.
    Anyway I know myself very well for overestimating the amount of time on a project or ... well my own skill.

    I would be interested in trying to code this. But you would have to specify the recipe for the lever and how the fuel system should work. For the sci-fi look you would have to create a texture pack on your own. And U would leave the balancing of the launch from ground pretty much to you
    Jamesol1 likes this.
  3. Offline


    I have no coding experience at all nor the time to learn it atm so i wouldn't be able to do the last bit you mentioned.for the lever just a lever with redstone around it would be sufficient. Whether the jet pack would be ingrained into the elytra or the chestplace I'm not sure (probably the elytra). Fuel wise i mean i'd like it to eat up coal of which you would have in your inventory i suppose.
    The main thing would be is making the elytra flight not just gliding and is on the slower side to add realism.
  4. I could take a stab at that, just wanted to clarify you want the elytra to move in the direction it's facing, not like modded jetpacks that work like creative flight correct? If so this will be very easy to code.
    Jamesol1 likes this.
  5. Offline


    Yes, but i would want it to move slower than the elytra does and in a controlled way... not like the elytra of which gathers speed depending on how steep the degrees of the fall etc.
  6. Offline


    Jamesol1 likes this.
  7. I haven't written a Bukkit plugin since Beta 1.7 (yes, Beta) so I'm very out of practice. I'm tinkering but I don't know if I'll actually finish it. Plus it probably won't hurt to have two different approaches to it since I probably have a slightly different implementation to what @Jamesol1 exactly described. In other words, try it if you want I can't guarantee mine will ever see the light of day.
    Jamesol1 likes this.
  8. Offline


    @MightyOne @GenerousGuava
    Thank you both for offering. If it's not too much hassle i mean both of you giving the basic flying part of it a crack would be great. How it flies is really the main part. I kind of get the jist of where you are both are going but cant quite imagine exactly how it will play in game.
  9. Offline


    So you said this lever would be used for launching the player into the air and also to accelerate during flight. So will the lever amount in your hand decrease when doing this? Or how did you mean that? (Sorry if I dont get everything. Im not a native speaker).

    And I thought of coal restoring the durability of the jetpack just by clicking with the coal on it. Is that okay? and how much coal would be needed to fully charge the jetpack?

    And what color should the displayed name of the jetpack/lever have?
  10. Now that I'm farther into the implementation, I can say the way I'm doing it is by simply applying thrust in the direction the player is looking. That way you can launch from the ground just fine, you'll just have to work against gravity until you pick up speed. I also have a realism setting in mind that you can turn off to allow instant turns without losing your speed. I'll say more once I can test it, not sure how it'll interact with the default gravity in Minecraft yet.

    Edit: Tested it and didn't quite work out as I planned, but now it's more like @Jamesol1 envisioned. You need to turn on the jetpack and jump to launch up, turn it off to deploy the Elytra, then you can use it to boost in the direction you're flying.
    Got a video of a test flight:
    Last edited: May 17, 2018
  11. Offline


    While using the lever the resource used to fuel it will decrease. For instance using the jump boost and accelerating will. Colour wise probably dark purple or dark red.

    Ah nice work. Would it be possible to change the sound the elytra makes in flight... perhaps adding a fiery explosion sound over the windy sound (texture pack maybe)? And also making the

    Also with the boost up into the sky i'd prefer for it to be less high... im thinking 8-10 blocks high and then the user would use the lever to boost off. Adding cloud particles to sort of recreate a wind beneath the player when they shoot up would be amazing.

    Thanks a lot for the time your putting in (both of you)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited: May 17, 2018
    MightyOne likes this.
  12. Offline


    @Jamesol1 ok thx.

    i never made a resource pack before but i thought i could try it once. so here is a resource pack that lets every elytra look like a jetpack (a bit annoying but cool xD)

    it would look like this: 2018-05-17_22.54.34.png

    with this item:

    idk do you like it? i think its looks kinda sci-fi like

    Attached Files:

    Jamesol1 likes this.
  13. Offline


    That looks great! Particle wise I'd rather black smoke/fire particles perhaps.

    Also with the launching in the air.. this may be too hard or too much work but if there could be a cool-down for that... that would be awesome... but if that is a lot of added work for a small feature.. no worries on that.
  14. I'm struggling a lot with the newer APIs, but it seems @MightyOne is doing quite well, so I'll just post the flying code I wrote in case you want to use parts or all of it. It's in Kotlin, but should be similar enough to Java for you to understand it.

    Jamesol1 likes this.
  15. Offline


    @GenerousGuava if course it is nice to share your code but to a certain point I have my own code. As well as I do not understand the concept of yours. You would have to comment it so i could understand it. Furthermore I don't think you should just give up so easily. I dont know how experienced you are in coding but maybe you can start over or lower your expectations at some points. It would be sad if you just stopped at this point.
    Jamesol1 likes this.
  16. I was just sharing my own approach to the flight mechanics, I'll be honest I might be able to complete this project but I won't have the time to maintain it and without maintenance it would quickly become obsolete. I have a good number of years coding experience, I just don't feel like putting in all this work when someone else is doing it already.

    I've annotated my code with tons of comments so if you feel like going through it you might see something you want to add to your own code. I gathered from your first response that you are fairly inexperienced so wanted to give you something you can maybe learn from ;)
    Jamesol1 likes this.
  17. Offline


    @GenerousGuava with simple I didn't mean rookie. I was just trying to say that I would like to be careful choosing projects because it is easy to underestimate the effort needed for one.
    I also don't see anything practical in your code. You save some checks in a movement listener that would take ~ 0 ms and instead create a list that eats ram. Your isUp() method can simply be replaced with vector.getY() > 0.
    I guess I'll stick to my concept
    Last edited: May 19, 2018
    Jamesol1 likes this.
  18. Offline


    Thanks for the work you're putting in Might. And thank you gen for giving it a shot and passing over the code. Hows it coming along?
  19. Offline


    @Jamesol1 so far im happy with my way of slowing down the flight and boosting. The particles for launching from ground are still missing and i am searching for a way to reduce the fuel continously.
    Jamesol1 likes this.
  20. Offline


    Great nice work!
  21. No need to be so rude. The vector one is my bad, I suck balls at visualising that stuff. Not sure why that solution didn't come up when I searched "how to tell if vector is up".

    I have to disagree with you on the list though. 8 Bytes of data for the reference per player with an Elytra is hardly "eating RAM". Even with a completely unrealistic 1024 players with an Elytra equipped that would only be 8KB of RAM usage.
  22. Offline


    @Jamesol1 Hello again,
    I think I finished the plugin in the way you wanted it to work. Here is a link to the github page where you can download it as a jar: https://github.com/GorgeousOne/ElytraJetpack

    Implemented commands are /getJetpack to get a jetpack and /jetpackReload for reloading values in the config.
    The crafting recipe for a jetpack launcher is a lever and 8 redstone around it.
    As mentioned I will leave the balancing to you. In the config you can change different values to improve the flight to your wishes.
    Refuelling works by clicking on a jetpack with coal. There are some awkward bugs I could not fix. So don't be surprised if a whole stack of coal disappears in creative mode.

    As always let me know if there is anything you are unhappy with. I hope you have a lot of fun with the plugin and have a nice day.

    Jamesol1 likes this.
  23. Offline


    Wow you did a great job it works perfectly! And i love how customizable the config is. One thing if it isn't too much work that would really add to it... an option to add more than one type of jet pack, so that for instance i could have 3 different jet packs with different speeds and coal consumption. I could then sell them at higher prices accordingly etc. So the config.yml would look like it's current state but with (in my example) 3 copies of that text with name headings for X jet pack. If naming the jet pack via the config is not doable.

    Also I don't know how easy or if this is even plugin based. But if there was a way of adding a firey/rocket sound when the jet pack goes into the ignited flight mode. It would make the jet pack even more immersive, but of course i wouldn't be looking for something really loud and annoying just a vague fire/rocket sound. I really liked the button clicking sound effect used when you toggling between glide and rocket boost, and also the launch boost sound, pretty sure you used the wither missile for it (it really does add immersion, the firey sound added in would complete that).

    Thanks again
    Last edited: May 22, 2018
  24. Offline


    Mhhhh I am impressed. Look I had to ask people how to find out a sound effect here on spigotmc and you can just tell that it is the wither attack sound.

    Ok implemented the changes. The link is updated. You now have a list in the config where you can add jetpacks with name, flight speed, boost force and coal consumption. There is no limitation on many elemets you put in there. The /getjetpack <name> command now requieres the name of the jetpack you want to receive. With the tab key you can see all available ones.

    The sound thingy would also be a resource pack thingy. It would be possible to replace the wind sound effect with rocket noise but i have no idea yet on hwo to do this.

    (Do you think this plugin is worth to be pusblished on curseforge?)
    Jamesol1 likes this.
  25. Offline


    Great thanks!
    One thing i can't seem to do is get the /getjetpack <name> to work.
    Here is the config for the adding of jet packs:
    name: '&5Ab&4normal Jetpack'
    flight_speed: 1.2
    boost_force: 0.3
    consumption_per_sec: 12

    I've tried doing /getjetpack jetpack1... but it says... could not find any jetpack with this name. I'm hoping it's just me being an idiot and doing something wrong. I did paly around with changing the names but it didn't work. I'm guessing what's in ''name'' is just for the naming of the item and the line above is the official command name.

    In terms of putting onto curseforge, i think it's a great little plugin.
  26. Offline


    @Jamesol1 well if you had pressed tab you would have seen that the plugin suggests you "abnormal_jetpack" :D
    (ok not in color but hey i wanted to use colors for one time in this forum)
  27. Offline


    Ah great thanks! Wasn't sure what you meant exactly by TAB... i was legit TABing in-game and questioning myself. If you are still up to further improving it there are some tweaks that would make it even better.

    One improvement would for the 'jetpack' to still function as a glider when it runs out of fuel (some kind of red text warning message would be great for this) so players don't immediately start falling out of the sky. OR, some how displaying the durability (aka fuel amount) as the experience or boss bar... that way players won't have an excuse if they run out of fuel and fall and die.

    And thanks for adding the text information in the box of which comes up when you hover over the elytra, i like that addition. Speaking of this is a very small detail... only bother adjusting this if it's easy, below is a screen shot of what the info box of the elytra comes up with... if you could some how change the ''Durability'' to ''Fuel'' that would make things more apparent for players (and add to the whole realism of the jetpack.

    @MightyOne ne
    I've edited what i wrote 10 minutes ago after rethinking. Just thought i'd notify you incase you decided to work on what i wrote then and then came back and saw i'd changed it.
    Last edited: May 23, 2018
  28. Offline


    ok making it so you do not crash midair is not a hard of a thing (smfbe) but im not good in creating custom boss bars or anything. I am also not so interested in adding any new features. My default limit would be 2 changes on 1 plugin so be careful what you wish for.
    Last edited: May 23, 2018
    Jamesol1 likes this.
  29. Offline


    Ok no worries, forget the whole boss bar thing and the 'changing of durability to fuel'. If you are able to make the jetpack still glide after running out of fuel that would be awesome. The reasoning behind this is that i could see players not being diligent in restocking their fuel and of course falling to their death.

    Many thanks for the work you have done on this.
    Last edited: May 23, 2018
  30. Offline


Thread Status:
Not open for further replies.

Share This Page