how can i Get XYZ of player

Started by Minecrafter99 on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 years ago
Joined Feb 2020
Points:
655

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
how can i Get XYZ of player

Im making this block called annoying block, So when i click on it, it will ask for a target player. Then the name will be saved in a variable.

I would like to know how can i summon an entity or place a block to a specific player such as Steve,Alex (name entered in the GUI.) without know there XYZ  

 

Active 5 months ago
Joined Aug 2019
Points:
806

User statistics:

  • Modifications: 0
  • Forum topics: 27
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 54
Try just using /execute …
Fri, 04/10/2020 - 18:52

Try just using /execute [player] /summon [entity] ~ ~ ~

You can use join blocks and NBT tags

Active 3 years ago
Joined Feb 2020
Points:
655

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
what do you mean by: "…
Fri, 04/10/2020 - 23:06

what do you mean by: "/execute [player] /summon [entity] ~ ~ ~" ?  what i need is to place a block OR entity at such player without needing the XYZ of that player 

Active 5 months ago
Joined Aug 2019
Points:
806

User statistics:

  • Modifications: 0
  • Forum topics: 27
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 54
Use the do command procedure…
Sat, 04/11/2020 - 09:03

Use the do command procedure block.Basically  it acts like it's the specified player, then it does the command that spawns an entity at same X same y same z. If you want a block, use /setblock ~ ~ ~ [block]

 

(Also, don't use the square brackets.)

Active 5 months ago
Joined Apr 2014
Points:
1223

User statistics:

  • Modifications: 2
  • Forum topics: 27
  • Wiki pages: 1
  • MCreator plugins: 0
  • Comments: 656
get X/Y/Z Coordinates of…
Thu, 05/07/2020 - 15:48

get X/Y/Z Coordinates of target entity