Gaider10 / GravityChanger

A fabric mod and api that lets you change player gravity direction
MIT License
20 stars 13 forks source link

Suggestion: /gravity command #9

Closed ImSpaceLover closed 2 years ago

ImSpaceLover commented 2 years ago

Note: I used my minecraft username instead of [player].

Set:

/gravity set [direction] [player] - sets players's gravity direction

Example: /gravity set North I_like_Space

Get:

/gravity get [player] - returns player's gravity direction

Example: Executed command: /gravity get direction I_like_Space Console/chat output: Gravity direction of I_like_Space is East

Reset:

/gravity reset [player] - sets player's gravity to Down

Example: /gravity reset I_like_Space

Persist:

/gravity persist [direction] [player] - makes player's gravity stay the same after death or /gravity persist [player] - does the same thing but uses current gravity direction instead of [direction]

Example: /gravity persist North I_like_Space or /gravity persist I_like_Space

Invert:

/gravity invert [player] - inverts player's gravity depending on their current gravity

Example: Previous direction: East Command: /gravity invert I_like_Space Current direction: West

Randomize:

/gravity randomize [player] - changes player's gravity to a random one

Example: /gravity randomize I_like_Space

Rotate:

/gravity rotate [forward/backward/left/right] [player] - changes player's gravity relative to their current gravity.

Example: Previous direction: Down Was looking at: North Executed command: /gravity rotate forward I_like_Space
Current direction: North

Previous direction: North Was looking at: East Executed command: /gravity rotate left I_like_Space
Current direction: Up

Gaider10 commented 2 years ago

Thanks for the suggestion, I added get set rotate and randomise commands. /gravity invert can be done with /gravity rotate up and /gravity reset with /gravity set down. /gravity presist down can already be done with the config and maybe it will also be possible to change the default player gravity in the future, but if someone really needs it now they can do it with /gravity set on death

ImSpaceLover commented 2 years ago

Thank you so much! I really needed this! Hope to see a new build soon because I'm not really good with gradle and all this mod making stuff