Topic category: Help with modding (Java Edition)
Let's say there's a custom block that you can activate. The block can be rotated. Also, let's say that there's a "lock" block in front of it.
I want to make it so if there's a lock in front of the block you have to first unlock it with a key (then the lock gets removed) and only then you can activate the block. Basically if the block is right clicked but there's some specific block in front of it, don't do the action it's supposed to do.
And yes, IN FRONT OF IT. Not to the side, or on it, it must be where it's front is located. Because you can rotate the block.