Topic category: Help with Minecraft modding (Java Edition)
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)
Do the same code but for the block next to it on each side. If it is the door also, get rid of it.