How do I lock any doors in minecraft using command blocks?How can I create a copy of an entity using command blocks?How to award player on every kill in Minecraft using command blocks?How do I determine which hopper the user clicked in Minecraft with command blocks?Is there a way of reverting to a previous save?Minecraft - execute command testing logic (lightning Sword)How to change the biome, or at least the grass color, without mods in MinecraftMinecraft combining /testfor names and enchants in one command?Minecraft : Problem with 1.9 command blocksHow can I clear items with a custom name using a command block? (using to "lock/unlock doors)How can I /give myself something stronger than the maximum book enchantment level?
Winning Strategy for the Magician and his Apprentice
What risks are there when you clear your cookies instead of logging off?
Do simulator games use a realistic trajectory to get into orbit?
BGP convergence issue
Can a black dragonborn's acid breath weapon destroy objects?
Are DSA and ECDSA provably secure assuming DL security?
Should I give professor gift at the beginning of my PhD?
Arriving at the same result with the opposite hypotheses
Should I compare a std::string to "string" or "string"s?
Was the output of the C64 SID chip 8 bit sound?
Smooth switching between 12 V batteries, with a toggle switch
How is water heavier than petrol, even though its molecular weight is less than petrol?
Passing multiple files through stdin (over ssh)
Is open-sourcing the code of a webapp not recommended?
What is the `some` keyword in SwiftUI
Where does "0 packages can be updated." come from?
Watts vs. Volt Amps
Can the poison from Kingsmen be concocted?
What's the largest optical telescope mirror ever put in space?
What can plausibly explain many of my very long and low-tech bridges?
What makes an item an artifact?
Is using haveibeenpwned to validate password strength rational?
What is the actual quality of machine translations?
Payment instructions allegedly from HomeAway look fishy to me
How do I lock any doors in minecraft using command blocks?
How can I create a copy of an entity using command blocks?How to award player on every kill in Minecraft using command blocks?How do I determine which hopper the user clicked in Minecraft with command blocks?Is there a way of reverting to a previous save?Minecraft - execute command testing logic (lightning Sword)How to change the biome, or at least the grass color, without mods in MinecraftMinecraft combining /testfor names and enchants in one command?Minecraft : Problem with 1.9 command blocksHow can I clear items with a custom name using a command block? (using to "lock/unlock doors)How can I /give myself something stronger than the maximum book enchantment level?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
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.
minecraft minecraft-commands
add a comment |
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.
minecraft minecraft-commands
Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
– Frank
Mar 18 '18 at 5:45
Where did you get the idea that it was ever possible to lock doors? You can only lock containers.
– Fabian Röling
Mar 18 '18 at 10:39
Do you have to use commands? Seems like a lot of work to do something an iron door effectively does.
– Kyle Rone
Mar 19 '18 at 19:27
add a comment |
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.
minecraft minecraft-commands
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.
minecraft minecraft-commands
minecraft minecraft-commands
asked Mar 18 '18 at 4:46
ThoanSnowThoanSnow
11
11
Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
– Frank
Mar 18 '18 at 5:45
Where did you get the idea that it was ever possible to lock doors? You can only lock containers.
– Fabian Röling
Mar 18 '18 at 10:39
Do you have to use commands? Seems like a lot of work to do something an iron door effectively does.
– Kyle Rone
Mar 19 '18 at 19:27
add a comment |
Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
– Frank
Mar 18 '18 at 5:45
Where did you get the idea that it was ever possible to lock doors? You can only lock containers.
– Fabian Röling
Mar 18 '18 at 10:39
Do you have to use commands? Seems like a lot of work to do something an iron door effectively does.
– Kyle Rone
Mar 19 '18 at 19:27
Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
– Frank
Mar 18 '18 at 5:45
Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
– Frank
Mar 18 '18 at 5:45
Where did you get the idea that it was ever possible to lock doors? You can only lock containers.
– Fabian Röling
Mar 18 '18 at 10:39
Where did you get the idea that it was ever possible to lock doors? You can only lock containers.
– Fabian Röling
Mar 18 '18 at 10:39
Do you have to use commands? Seems like a lot of work to do something an iron door effectively does.
– Kyle Rone
Mar 19 '18 at 19:27
Do you have to use commands? Seems like a lot of work to do something an iron door effectively does.
– Kyle Rone
Mar 19 '18 at 19:27
add a comment |
2 Answers
2
active
oldest
votes
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[type=armor_stand,r=2]
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[r=2,type=armor_stand,name=Door1]
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.
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
add a comment |
/blockdata ~ ~-2 ~ Lock:Key
Yes, I'm using command
for locking the door
he opened if you open with item renamed "Key"
New contributor
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "41"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f329432%2fhow-do-i-lock-any-doors-in-minecraft-using-command-blocks%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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[type=armor_stand,r=2]
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[r=2,type=armor_stand,name=Door1]
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.
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
add a comment |
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[type=armor_stand,r=2]
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[r=2,type=armor_stand,name=Door1]
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.
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
add a comment |
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[type=armor_stand,r=2]
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[r=2,type=armor_stand,name=Door1]
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.
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
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[type=armor_stand,r=2]
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[r=2,type=armor_stand,name=Door1]
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.
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
edited Mar 20 '18 at 13:49
answered Mar 19 '18 at 18:52
ErramErram
9610
9610
add a comment |
add a comment |
/blockdata ~ ~-2 ~ Lock:Key
Yes, I'm using command
for locking the door
he opened if you open with item renamed "Key"
New contributor
add a comment |
/blockdata ~ ~-2 ~ Lock:Key
Yes, I'm using command
for locking the door
he opened if you open with item renamed "Key"
New contributor
add a comment |
/blockdata ~ ~-2 ~ Lock:Key
Yes, I'm using command
for locking the door
he opened if you open with item renamed "Key"
New contributor
/blockdata ~ ~-2 ~ Lock:Key
Yes, I'm using command
for locking the door
he opened if you open with item renamed "Key"
New contributor
New contributor
answered 50 mins ago
Zero10Zero10
1
1
New contributor
New contributor
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f329432%2fhow-do-i-lock-any-doors-in-minecraft-using-command-blocks%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
– Frank
Mar 18 '18 at 5:45
Where did you get the idea that it was ever possible to lock doors? You can only lock containers.
– Fabian Röling
Mar 18 '18 at 10:39
Do you have to use commands? Seems like a lot of work to do something an iron door effectively does.
– Kyle Rone
Mar 19 '18 at 19:27