Data Packs Simple

Simple Code Lock - Snapshot 25w20a (New /dialog command)

  • 1.3k views 0 today
  • save_alt 88 downloads
Compatibility
Minecraft 1.21
Changes include
  • Functions
  • 9
  • 6
  • 8
qnoss
Lvl 45Master Herobrine
34

Code Lock
Does not work in newer Snapshots!

This Datapack lets you add command blocks as combination locks.
Input this command:
/function code:code {correct_code:1234}
Replace the code with your own. You can insert any number you want.

Then summon a door with this command:
/summon minecraft:block_display ~ ~ ~ {Tags:["door"]}
You can change the quartz_pillar texture by editing the block_display function.



  Have something to say?

User5963208G
08/25/2025 1:04 pm
Level 1 : New Miner
Could you explain a little more clearly how to create such a door? I wrote the first command in the command block, what color should it be? Does he need food? then I created a door with the second team and I can't interact with it in any way, its teams can't find and kill it (
2
qnoss
08/26/2025 11:33 am
He/Him • Level 45 : Master Herobrine
history
Yeah sorry this is an old project and i did a bad job at explaining!
i think it works best to place a regular commandblock in the ground with pressureplate on top, and put the function command in it. This will trigger the input window!
then place the next regular commandblock right next to the first one and place the summon command in it. Activate it once to create the door and then remove the command block so there is only one door. If it does not work, try to /kill @e[​type=!player,distance=..5] standing next to the entities. This will reset them.
i hope this helps! As i said its an old project and i dont remember everything.
if you still need help, let me know!
oh and it ONLY works in that specific snapshot!
the syntax has been changed since then
1
sunarin_25
06/05/2025 1:50 am
Level 1 : New Miner
I put a block in, but not in the place I wanted, and now I don't know how to remove it. Could you tell me how to remove the quartz?

(Sorry for my English, it's the translator)
2
qnoss
06/05/2025 11:38 am
He/Him • Level 45 : Master Herobrine
You could do /kill @e[type=block_display,tag=door] to remove all quartz blocks or /kill @n[type=block_display,tag=door] to remove the nearest
2
sunarin_25
06/05/2025 8:43 pm
Level 1 : New Miner
i tried but nothing.
Could it be because I removed the data pack?

I thought if I removed it would disappear, an now I can now get into my house but there are still some visible quartz blocks left. But I can walk through them.
2
qnoss
06/05/2025 9:04 pm
He/Him • Level 45 : Master Herobrine
hm.. maybe try /kill @e[​type=block_display,distance=..30] when near it?
1
regfunkid
05/19/2025 5:43 am
He/Him • Level 41 : Master Cat Procrastinator
Cool use of Dialogs! Can't wait to see what else people do with this!
2
qnoss
05/19/2025 7:18 am
He/Him • Level 45 : Master Herobrine
The possibilities are endless :) And thanks!
1

Welcome