How to make my item place a block as if it was placed by a player?

Started by IronStudios on Tue, 03/02/2021 - 22:17

Topic category: Help with modding (Java Edition)

Last seen on 02:58, 24. May 2022
Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make my item place a block as if it was placed by a player?
Tue, 03/02/2021 - 22:18 (edited)

I want my item to place a block as if it were placed by the player, but it instead replaces the block they're looking at.

I am using "Place [block] at x:[x] y:[y] z:[z]" and I used raytracing to get the position of the block, but it, again, replaces the block instead of placing one next to it.

Can anyone help me?

https://imgur.com/FAIS1NS

Edited by IronStudios on Tue, 03/02/2021 - 22:18