Locked door can't detect the second door next to it when open (locked double door)

Started by The Little Treecake on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Locked door can't detect the second door next to it when open (locked double door)
Mon, 10/30/2023 - 16:44 (edited)

I currently make a locked door you can only open with a key. So far everything works including the detection of the key in main hand, the effects, etc...

If a locked door detected the key successfully and destroys itself (it should do that dw.), it should destroy the locked door next to it as well but it doesn't. It only destroys itself and the door next to it is still there. I basically want to make a locked double door but so far I could only make one of two doors unlock itself.

I tried to use the block detection but somehow ended up with detecting the door that will be destoryed by the key anyway which is totally useless and not my intention.
 


This is the code of the block detection. I want it to detect and destroy the second door next to it (if the door was successfully unlocked)

https://imgur.com/a/zt0w2gJ

 

Edited by The Little Treecake on Mon, 10/30/2023 - 16:44
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do the same code but for the…
Sun, 11/05/2023 - 16:47

Do the same code but for the block next to it on each side. If it is the door also, get rid of it.