Page 1 of 1

how would you go about doing this?

PostPosted: 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.

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

PostPosted: Sun Mar 31, 2013 18:04
by prestidigitator
I can think of two ways to do this:

  1. 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
  2. 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).

PostPosted: Sun Mar 31, 2013 19:28
by snakevenom
prestidigitator wrote:I can think of two ways to do this:

  1. 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
  2. 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?

PostPosted: Sun Mar 31, 2013 19:35
by kaeza
snakevenom wrote:
prestidigitator wrote:I can think of two ways to do this:

  1. 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
  2. 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.

PostPosted: Sun Mar 31, 2013 19:42
by snakevenom
kaeza wrote:
snakevenom wrote:
prestidigitator wrote:I can think of two ways to do this:

  1. 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
  2. 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.