Jump to content

Recommended Posts

Posted

Hello Forge! I am in need of a mechanism to get a player's X Y and Z coordinates, I have tried two different ways:

- entityPlayer.getPosition(0).xCoord; // I don't know what the parameter in getPosition is for

- entityPlayer.posX

 

Both cause NoSuchMethod errors during runtime. So, my question is how do I get a player's location?

 

Thanks in advance for any answers!

  • 6 years later...
Posted

Is there any way to get a more precise coordinate of the player? The getting of xyz coordinates from the method that you said only returns int values, is there anyway to get it more accurate to more decimal places? 

(assume what you meant for getting the position to be -

Minecraft.getMinecraft().thePlayer.getPosition()

then .getX() etc.) 

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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