You are watching: Minecraft how to lock a door
You have the right to do this by making use of invisible armor stands the blocks the door therefore they can"t right click it. So right here are the measures for it.
Get the cordinates infront the the door.
Then use this command and readjust the X Y Z /summon armor_stand X Y Z Invisible:1b,Invulnerable:1b,PersistenceRequired:1b,NoBasePlate:1b,NoGravity:1b,DisabledSlots:31.
Now you have to use decimals to block the hole door. So now reapet the 2nd step however 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 end the door climate you have to the exact same thing yet now you require to add 1 come Y.
If you have to unlock the door, then ar this command:
a SelectedItem:id:"minecraft:ANYITEM",tag:display:Name:"KEY NAME"
In a reapiting always energetic command block and then place this into a condential chain, always active command block:
IF YOU need DIFFRENT tricks AND much more KEYS, THEN name THE ARMOR stand BY adding THIS come THE ARMOR was standing COMMAND CustomName:"Door1" and also then use this command because that the key:
To gain the key use this: /give
p minecraft:WHATEVER_ITEM 1 0 display:Name:Key Name
Example: us say the the cordinates infront the the door is 1460 4 -150. Then we execute this.
First we summon the armor stand ifront that 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 till 0.8. Climate you include 1 ~ above Y so it will certainly be choose this:/summon armor_stand 1460 5 -150 Invisible:1b,Invulnerable:1b,PersistenceRequired:1b,NoBasePlate:1b,NoGravity:1b,DisabledSlots:31
And reapet until .8 currently you have actually to offer yourself the key and her done
enhance this price
edited Mar 20 "18 at 13:49
answered Mar 19 "18 in ~ 18:52
16022 silver badges1313 bronze title
include a comment |
/blockdata ~ ~-2 ~ Lock:KeyYes, I"m utilizing commandfor locking the doorhe opened if you open up with item renamed "Key"
improve this prize
edited Jun 4 "19 in ~ 7:06
1,20922 gold badges1616 silver badges2828 bronze title
reply Jun 4 "19 in ~ 3:52
include a comment |
Thanks for contributing an answer to Arqade!Please be sure to answer the question. Provide details and also share her research!
But avoid …Asking because that help, clarification, or responding to various other answers.Making statements based upon opinion; earlier them increase with references or an individual experience.
To find out more, view our advice on writing good answers.
See more: How Far Is A Click In Distance Of 1 Click? How Far Is A Klick In Distance
Sign increase or log in in
authorize up using Google
sign up utilizing Facebook
authorize up using Email and also Password
Post together a guest
email Required, but never shown
Post together a guest
Required, yet never shown
short article Your answer Discard
Not the answer you're spring for? Browse various other questions tagged minecraft-java-edition minecraft-commands or asking your own question.
Screenshot of the mainly
I like to speak to this one “Dank Mario” indigenous Super Mario Odyssey by Morgan
send your photograph Hall of reputation
Featured ~ above Meta
How have the right to I develop a copy of one entity utilizing command blocks?
exactly how to award player on every kill in Minecraft making use of command blocks?
just how do I determine which hopper the user clicked in Minecraft through command blocks?
Minecraft - execute command trial and error logic (lightning Sword)
exactly how to adjust the biome, or at least the grass color, without mods in Minecraft
Minecraft : problem with 1.9 command blocks
Minecraft Command Blocks, making use of /data string values within other commands
warm Network questions much more hot inquiries
subscribe to RSS
question feed To i ordered it to this RSS feed, copy and also paste this URL into your RSS reader.
ridge Exchange Network
site design / logo © 2021 stack Exchange Inc; user contributions license is granted under cc by-sa. Rev2021.10.25.40556