Started by
СайтменПлей
on
Topic category: Help with Minecraft modding (Java Edition)
Im trying to find a way of getting the players coordinates if the procedure is called by an entity, idc if it will break multiplayer
- Here's what I have for you. First step is to make three global workspace variables. PlayerX, PlayerY, and PlayerZ. You want these to be numbers, and it's best to leave them as the default of GLOBAL_MAP.
- In the procedure itself you will also need two new local variables, rangeNum and foundPlayer. Found player will be entity type and rangeNum will of course be a number.
- Follow the structure of the image I am adding to this post. It sets the search distance, finds the player, saves the player to the entity variable, and then sets the global variables to the x, y, and z of the playerEntity. If no player is found it adds 100 to the search distance and looks again. For performance the search distance caps at 500. If you want you can change that to something else.
- Image for reference
Jump to top
Permalink
- Log in or register to post comments