Pickaxe that place blocks

Started by JoakDash300 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Pickaxe that place blocks
Tue, 02/08/2022 - 02:45 (edited)

ok, my problem is that I have a pickaxe that when you right click it should put a torch, but what it does is replace the block I'm looking at, I tried putting y+1 but when I want to put a torch next to me it replaces the block above the one I'm looking at, can someone help me?

 

 

 

(Also if you could help me to know if there is a procedure that detects blocks, for example I have a tool that has to detect if the block attached to which I am clicking is a diamond block and if it detects it, do something if not do nothing)

Edited by JoakDash300 on Tue, 02/08/2022 - 02:45
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You should be able to get…
Tue, 02/08/2022 - 12:06

You should be able to get the face of the block you rightclicked and then using the new direction procedures figure where to place the torch.

Detecting blocks is as simple as an if statement, just if provided blockstate = diamond ore.

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
someone send me a screenshot…
Tue, 02/08/2022 - 20:18

someone send me a screenshot of how to do that

 

 

sorry I don't know how to use mcreator properly

 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Using the When rightclicked…
Wed, 02/09/2022 - 07:12

Using the When rightclicked on block trigger,

This should work

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you very much …
Wed, 02/09/2022 - 19:02

thank you very much (although I can only put torches on the ground and not on the walls, at least I can put torches well)