Started by 
personhuman
 on 
    Topic category: Help with Minecraft modding (Java Edition)
exactly what the title says. i'm trying to make an item that can open any kind of lock or door, including vaults and ominous vaults. i've managed to make the vault open consistently, but i can't get it to dispense items or prevent the player from reusing the vault. any ideas?
Edited by personhuman on Sat, 10/11/2025 - 17:23
                            
This is a bit big but it does work,
thanks! it works exactly like a trial key! now i just have to make it so that it'll only run when you have the key in hand and the block is a vault, but i can do that myself. again, thanks!
👍
actually, when i was working on putting the code into the procedure for the key, i noticed that the game crashed because the block was replaced with air, and it seemed to work just fine without the block replacement, but idk, maybe it's there for a reason. just felt that i should've mentioned that, though. still works great nonetheless!