How To Make A Door That Locks In Minecraft How To Lock A Door ? : Minecraft

I came to this website to find some answers how to lock a door with commands for my minecraft horror game. I was pretty aware that this method only works for 1.8, but now I”m curious if there”s any other commands that can be used to lock a door for 1.12.2 or higher.

Đang xem: Minecraft how to lock a door

*

You can do this by using invisible armor stands that blocks the door so they can”t right click it. So here are the steps for it.

Get the cordinates infront of the door.

Then use this command and change the X Y Z /summon armor_stand X Y Z {Invisible:1b,Invulnerable:1b,PersistenceRequired:1b,NoBasePlate:1b,NoGravity:1b,DisabledSlots:31}.

Now you need to use decimals to block the hole door. So now reapet the second step but now write .2 – .4 – .6 – .8 ifront of the X or Z cordinate (depents on were it”s facing) so etc:

/summon armor_stand X.2 Y Z {Invisible:1b,Invulnerable:1b,PersistenceRequired:1b,NoBasePlate:1b,NoGravity:1b,DisabledSlots:31}

If there is no roof over the door then you need to the exact same thing but now you need to add 1 to Y.

If you need to unlock the door, then place this command:

/testfor
a {SelectedItem:{id:”minecraft:ANYITEM”,tag:{display:{Name:”KEY NAME”}}}}

In a reapiting always active command block and then place this into a condential chain, always active command block:

/kill
e

IF YOU NEED DIFFRENT KEYS AND MORE KEYS, THEN NAME THE ARMOR STANDS BY ADDING THIS TO THE ARMOR STAND COMMAND CustomName:”Door1″ And then use this command for the key:

/kill
e

To get the key use this: /give
p minecraft:WHATEVER_ITEM 1 0 {display:{Name:Key Name}}

Example: We say that the cordinates infront of the door is 1460 4 -150. Then we do this.

Read more: Raritan Native American Pow Wow Nj, Raritan Native American Festival And Pow Wow

First we summon the armor stands ifront of the door: /summon armor_stand 1460 4 -150 {Invisible:1b,Invulnerable:1b,PersistenceRequired:1b,NoBasePlate:1b,NoGravity:1b,DisabledSlots:31}

Now we do the this: /summon armor_stand 1460.2 4 -150 {Invisible:1b,Invulnerable:1b,PersistenceRequired:1b,NoBasePlate:1b,NoGravity:1b,DisabledSlots:31}

And reapet until 0.8. Then you add 1 On Y so it will be like this:/summon armor_stand 1460 5 -150 {Invisible:1b,Invulnerable:1b,PersistenceRequired:1b,NoBasePlate:1b,NoGravity:1b,DisabledSlots:31}

And reapet until .8 Now you have to give yourself the key and your done

Share
Improve this answer
Follow
edited Mar 20 “18 at 13:49
answered Mar 19 “18 at 18:52

*

ErramErram
16011 silver badge1313 bronze badges
Add a comment |
0
/blockdata ~ ~-2 ~ {Lock:Key}Yes, I”m using commandfor locking the doorhe opened if you open with item renamed “Key”

Share
Improve this answer
Follow
edited Jun 4 “19 at 7:06

*

Glorfindel
1,19122 gold badges1414 silver badges2525 bronze badges
answered Jun 4 “19 at 3:52

*

Zero10Zero10
1
Add a comment |

Your Answer

Thanks for contributing an answer to Arqade!

Please be sure to answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

Read more: wow the delicate art of telemancy guide

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Submit

Post as a guest

Name
Email Required, but never shown

Post as a guest

Name
Email

Required, but never shown

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged minecraft-java-edition minecraft-commands or ask your own question.

Screenshot of the Week

*

Overlooking a Frozen Dam in Horizon Zero Dawn by arghtype
Submit your photo Hall of fame
Featured on Meta
Related
3
How can I create a copy of an entity using command blocks?
1
How to award player on every kill in Minecraft using command blocks?
3
How do I determine which hopper the user clicked in Minecraft with command blocks?
3
Minecraft – execute command testing logic (lightning Sword)
1
Minecraft : Problem with 1.9 command blocks
1
Minecraft Command Blocks, using /data string values within other commands
Hot Network Questions more hot questions

Question feed
Subscribe to RSS
Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Arqade
Company
Stack Exchange Network
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.3.23.38880

Leave a Comment