Gravity Changer

Gravity Changer

246k Downloads

API request

qouteall opened this issue ยท 2 comments

commented

I am considering integrating Immersive Portals (ImmPtl) mod with Gravity Changer mod.
To accomplish that, I need GravityChanger to provide some sets of API:

  • Get the offset of the player's eye pos from the player's feet pos.
  • Set a player's gravity direction without changing the camera position. (currently, the API keeps the feet pos and change eye pos when changing gravity) Turns out not needed
  • Get the camera rotation quaternion Turns out not needed

(this list may change)
I can implement these API on ImmPtl's side. But it would be better that gravity changer provides these API.

And I prefer the API of another style. For example, currently setting a player's gravity direction is done by

((RotatableEntityAccessor) player).gravitychanger$setGravityDirection(direction, false);

I want this kind of API:

GravityChangerAPI.setGravityDirection(player, direction)

iPortalTeam/ImmersivePortalsMod#877

commented

Is this what you need? 53276ff

commented

Yes.
(I also use some methods of RotationUtil, if you change these methods tell me in advance)