Jump to content

Difference between ClientPlayerEntity position methods/members


Antonii

Recommended Posts

My mod will be client-side only and running on the 1.16 version of Forge.

I want to know what's the difference between getPosition(), xo, xBob, xo, xOld? I think xOld stores the last position of the player before being updated by the server (or perhaps before taking a step?) but what about the others?

I used to take the position of the player directly by accessing posX, posY and posZ. This was on the 1.12 version. Now I am not sure if I can simply replace all those with xo, yo and zo. That would make my job much easier.

 

Edited by Antonii
Link to comment
Share on other sites

Thanks. Do you also know the current way of taking a player's direction (north, south etc)?

I used to call

EnumFacing efc = player.getHorizontalFacing().getOpposite();

but the enum does not exist anymore and so the methods. I found what seems to be the replacement Directions but I could not find how it is used in the Entity class (a quick reference-search didn't return much)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.