How can I override doors/trapdoors opening if right clicking with a specific tool?

Started by pixelbank on

Topic category: Help with modding (Java Edition)

Last seen on 18:05, 16. Jul 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I override doors/trapdoors opening if right clicking with a specific tool?

I have a trapdoor which I want to replace with a right click if an axe is in the main hand - think of it like scraping copper blocks but for trapdoors

I've used a global procedure, that works just fine with regular blocks. But when I right click the trapdoor, it does not replace the block and instead opens/closes it. Is there a way to override the open/close states?

Here's an image of the procedure https://imgur.com/stNsKlv

Any help is much appreciated, I've been around the block several times with this and can't figure it out

Thanks

Last seen on 23:46, 16. Jul 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could probably fix the…
Sun, 01/28/2024 - 02:19

You could probably fix the issue by just shifting and right clicking, or adding a condition that the player must be shifting as well to trigger the procedure.


 

Last seen on 18:05, 16. Jul 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@TZO_Ghoul Yes! it…
Mon, 01/29/2024 - 10:47

@TZO_Ghoul Yes! it absolutely works when the player shift clicks, just a shame I can't override the right click as it's pretty annoying when you forget to shift