how would you go about doing this?

Posted:
Sun Mar 31, 2013 16:16
by snakevenom
i want to create a mod that allows you to fly without permissions however it requires you to have a item, lie some sort of a jet pack or flying ring.
is this possible and how can i do it?
i saw a video from a old version of the boats mod and in the boat you could just fly around.

Posted:
Sun Mar 31, 2013 16:46
by Topywo

Posted:
Sun Mar 31, 2013 18:04
by prestidigitator
I can think of two ways to do this:
- Have the object temporarily grant the fly privilege (you'll have to carefully track when to revoke it, accounting for corner cases like logouts, disconnects, destroyed items, etc.), or
- Spawn an entity, attach the player to it, and test the player's controls to move the entity (not sure how smooth this will be).

Posted:
Sun Mar 31, 2013 19:28
by snakevenom
prestidigitator wrote:I can think of two ways to do this:
- Have the object temporarily grant the fly privilege (you'll have to carefully track when to revoke it, accounting for corner cases like logouts, disconnects, destroyed items, etc.), or
- Spawn an entity, attach the player to it, and test the player's controls to move the entity (not sure how smooth this will be).
i would like to do the first one but i dont know how, i know basic modding but not how to temporarily grant privs :( anyone wanna help?

Posted:
Sun Mar 31, 2013 19:35
by kaeza
snakevenom wrote:prestidigitator wrote:I can think of two ways to do this:
- Have the object temporarily grant the fly privilege (you'll have to carefully track when to revoke it, accounting for corner cases like logouts, disconnects, destroyed items, etc.), or
- Spawn an entity, attach the player to it, and test the player's controls to move the entity (not sure how smooth this will be).
i would like to do the first one but i dont know how, i know basic modding but not how to temporarily grant privs :( anyone wanna help?
I'd suggest you take the second option; It's less smooth, but also less prone to bugs.

Posted:
Sun Mar 31, 2013 19:42
by snakevenom
kaeza wrote:snakevenom wrote:prestidigitator wrote:I can think of two ways to do this:
- Have the object temporarily grant the fly privilege (you'll have to carefully track when to revoke it, accounting for corner cases like logouts, disconnects, destroyed items, etc.), or
- Spawn an entity, attach the player to it, and test the player's controls to move the entity (not sure how smooth this will be).
i would like to do the first one but i dont know how, i know basic modding but not how to temporarily grant privs :( anyone wanna help?
I'd suggest you take the second option; It's less smooth, but also less prone to bugs.
yes however i do not care about bugs, only that it works. i can debug a item but i cannot make something a lot smoother.