Started by
JoakDash300
on
Topic category: Help with Minecraft modding (Java Edition)
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
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.
someone send me a screenshot of how to do that
sorry I don't know how to use mcreator properly
Using the When rightclicked on block trigger,
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)