How can i place a block where the player is standing.

Started by BlaBlaSillySheep on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can i place a block where the player is standing.

I don't really need to go into much detail as the title pretty much explains it all. I've tried replacing the "y" to a 1 in "Place block at x y z" but that's made it so it only does it above bedrock in a flat world. I'm sorry if someone has posted this and it has been answered before, i have searched and not found any results so if you have some ideas please let me know. Thanks :) 

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You're close! Do "y + 1",…
Tue, 08/25/2020 - 03:17

You're close! Do "y + 1", that way it still uses the player's exact coordinates and just adds 1 to it. When you set the y exactly to 1, it replaces the player's original coordinate with 1, so it will always be all the way below them at y level 1, and not the player's y value.

Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tysm! i can now make a mod…
Tue, 08/25/2020 - 13:36

Tysm! i can now make a mod that places trees below you

Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and y + -1 if you want it…
Fri, 10/02/2020 - 19:18

and y + -1 if you want it below you