how to place blocks on right click

Started by madcock83 on Thu, 05/28/2020 - 02:58

Topic category: Help with modding (Java Edition)

Last seen on 02:52, 30. Jun 2020
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
how to place blocks on right click
Thu, 05/28/2020 - 02:58

This sounds easy as can be and is done normally by minecraft itself.  But for some reason im not seeing the answer. 

Ive made an item.  for purposes of shortening this.  lets say on right click on a block it needs to place a cobble stone down.  same as it would if i was trying to place a normal piece of cobblestone.  every right click on any block would place a cobblestone.  i can get it do this but it replaces the block that its clicked on.  its seems simple enough but im not seeing it.

On right-clicked trigger -…
Thu, 05/28/2020 - 10:15

On right-clicked trigger - Place block procedure

I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei

Last seen on 02:52, 30. Jun 2020
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
I've looked on that list. It…
Fri, 05/29/2020 - 09:44

I've looked on that list. It's not covered. I used to have a video on that list. Doesn't seem to be there anymore.

 

But when I use that procedure it replaces the block I'm looking at instead of places the cobble on top or side of it like it would do if the item I'm using to place the block was a block itself.

Use side check to see which…
Fri, 05/29/2020 - 10:22

Use side check to see which side was clicked and offset your coordinates accordingly.

There will not be a specific tutorial for you, but these tutorials can teach you the concepts of things you need to know.

Last seen on 02:52, 30. Jun 2020
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
I thought about this after…
Fri, 05/29/2020 - 16:36

I thought about this after posting last night.  I tried it today and didnt get it to work.  I tried something along the lines of get block direction.  but it only seem to work if get block direction at xyz =north.  and it places when clicking on any side.  I know its something simple Im just not seeing it.  Im not sure if get block direction is the same as checking block side.  What should i be using