You are watching: How to lock doors in minecraft
You have the right to do this by utilizing invisible armor stands that blocks the door so they can"t appropriate click it. So here are the actions for it.
Get the cordinates infront the 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 have to use decimals to block the feet door. So now reapet the second step but now compose .2 - .4 - .6 - .8 ifront that the X or Z cordinate (depents on were it"s facing) therefore 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 need to the exact same thing but now you need to include 1 come Y.
If you must unlock the door, then location this command:
a SelectedItem:id:"minecraft:ANYITEM",tag:display:Name:"KEY NAME"
In a reapiting always energetic command block and then place this right into a condential chain, always active command block:
IF YOU require DIFFRENT secrets AND an ext KEYS, THEN name THE ARMOR was standing BY adding THIS come THE ARMOR was standing COMMAND CustomName:"Door1" and also then use this command because that the key:
To acquire the crucial use this: /give
p minecraft:WHATEVER_ITEM 1 0 display:Name:Key Name
Example: we say the the cordinates infront that the door is 1460 4 -150. Climate we carry out this.
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 carry out 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 include 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 currently you have actually to offer yourself the an essential and your done
improve this answer
edited Mar 20 "18 in ~ 13:49
answer Mar 19 "18 in ~ 18:52
16022 silver badges1313 bronze badges
include a comment |
/blockdata ~ ~-2 ~ Lock:KeyYes, I"m using commandfor locking the doorhe opened if you open with item renamed "Key"
improve this price
edited Jun 4 "19 at 7:06
1,21122 gold badges1616 silver badges2828 bronze badges
reply Jun 4 "19 in ~ 3:52
add a comment |
Thanks for contributing solution to Arqade!Please be certain to answer the question. Provide details and 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 referrals or personal experience.
To discover more, check out our advice on writing an excellent answers.
See more: Answered: What Is The Common Name Of The Following Compound? ? 0
Sign up or log in in
sign up using Google
sign up utilizing Facebook
sign up using Email and also Password
Post together a guest
email Required, yet never shown
Post together a guest
Required, yet never shown
write-up Your prize Discard
Not the prize you're spring for? Browse other questions tagged minecraft-java-edition minecraft-commands or questioning your very own question.
Screenshot of the mainly
mine pumpkin patch from my city in pet Crossing brand-new Horizons by GammaGames
send your picture Hall of call
Featured top top Meta
How deserve to I create a copy of one entity making use of command blocks?
how to compensation player on every death in Minecraft utilizing command blocks?
how do I recognize which hopper the user clicked in Minecraft through command blocks?
Minecraft - execute command experimentation logic (lightning Sword)
just how to readjust the biome, or at the very least the grass color, without mods in Minecraft
Minecraft : difficulty with 1.9 command block
Minecraft Command Blocks, utilizing /data string worths within other commands
warm Network questions an ext hot concerns
i ordered it to RSS
inquiry feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
stack Exchange Network
site design / logo © 2021 stack Exchange Inc; user contributions license is granted under cc by-sa. Rev2021.11.12.40742