How To Lock Your Minecraft Chests With One Simple Command! (Updated)

Sdílet
Vložit
  • čas přidán 28. 05. 2024
  • In this video i show you how to lock minecraft chests in minecraft java with one simple command. I show you how to make a lockable minecraft chest with a minecraft key to unlock the chest with (chest key password). If you like the content let me know by leaving a like and Subscribing it really helps me out a lot! Also comment what you want me to do next!
    Command: /data merge blocks ~ ~ ~ {Lock:”your lock code”} please note you have to fill in the coords of the block at the ~~~. You can get this by staring at the block. Please watch video to see how to do It 😁.
    - - - Links - - -
    📷 Instagram: / undermycap
    - - - Hashtags # - - -
    #minecraft #minecrafttutorial #minecrafttutorials #minecraftcommand #minecraftcommands
    🧢 You found the secret description cap! :O
    Comment "i found the secret cap" to show others you found it!
    00:00 Introduction
    00:14 Demo Of Locked Chest
    00:43 Step1: Enable Cheats
    01:01 Step2: Command For Locking Minecraft Chest
    02:24 Step3: Key Creation For Locked Minecraft Chest
    02:58 Locking Minecraft Shulker Boxes
    03:41 Outro Subscribe and Like For More!
  • Hry

Komentáře • 108

  • @ArenSpace
    @ArenSpace Před rokem +13

    how would you make it so that when you open that specific chest with the key that the key gets consumed? because this would be perfect for an adventure map

    • @theliteralcow
      @theliteralcow Před 9 měsíci +1

      i know this is a late reply but i think this should work
      1. /data merge block XYZ {Lock:"LOCK NAME HERE"} - makes a lock
      2. /scoreboard objectives add chest_opened minecraft.custom:minecraft.open_chest - makes a scoreboard to use to detect when a chest is opened
      3. /scoreboard players add (PLAYER NAME) chest_opened 0
      4. /execute as @s run execute if entity @a[scores={chest_opened=1..}] run clear @s (ITEM NAME YOU ARE USING){display:{Name:{"text":"KEY NAME HERE"}}} (put on repeating command block)
      5. /scoreboard players reset (PLAYER NAME HERE) chest_opened (put on chain command block, always active, conditional, put it on the little dot where you placed repeating command block)
      I think this works, ill test it out
      it didnt work, i think you can make it work if you tweak some things but i dont have time for that rn sorry

  • @bxxtt
    @bxxtt Před rokem +13

    This Guy Should have WAYYY more Subs. Thanks Man.

    • @undermycap
      @undermycap  Před rokem +3

      Thank you so much! Have a great day!

  • @jetray3104
    @jetray3104 Před rokem +9

    you can also do it with entities, not blocks, if you want a boss fight like that, you can sometimes make the boss immune to damage, then make it no longer be immune again, so you can damage him. Its quite nice. one is
    "/data merge entity {}"
    Don't type the
    Replace the NBT to one of this
    {Invulnerable:1}
    And More
    Go into MC Stacker for generating mobs, and more

    • @undermycap
      @undermycap  Před rokem +3

      You can lock entities? As in any entity with a chest storage? That is so cool I will have to try it out!

    • @jetray3104
      @jetray3104 Před rokem

      @@undermycap ya, any entity, like zombies, passive mobs and more

  • @Taksha14
    @Taksha14 Před rokem +3

    it wont work for me it says the target block is not a block entity

  • @NotKaraKurt
    @NotKaraKurt Před rokem

    Can we add more than one lock?
    For example, can we make a chest that can be opened with an iron ingot named "Key", at the same time an iron ingot named "Backup Key" can be opened?

  • @Nova_BG
    @Nova_BG Před 6 měsíci +1

    You helped me to build my horror map😊👍

  • @Sonic_Phantoms
    @Sonic_Phantoms Před 2 měsíci

    Can you make it so that once you open the chest with the key can the key disappear after one use?

  • @blazingarrows6117
    @blazingarrows6117 Před 3 měsíci

    Thank you!

  • @MoldenTree
    @MoldenTree Před rokem

    Does this work with Doors? I tried but it didn't work.

  • @noahandersen9058
    @noahandersen9058 Před 4 měsíci

    doesnt work for me i typed the exact thing just different coords

  • @albertfekete1500
    @albertfekete1500 Před rokem

    what if a player mines the shulker box it will just drop and if you place it will it still be locked?

    • @undermycap
      @undermycap  Před rokem

      Hello sadly it doesn’t keep it locked so it can be opened. It would be very useful if you could lock it and make it portable 😀.

  • @azimli52_kurnaz_ironi_anti-ilk

    yay! good content!!

  • @fadhilmlas853
    @fadhilmlas853 Před rokem +1

    Thanks for the tutorial 👍

    • @undermycap
      @undermycap  Před rokem +1

      All good! I’m glad it helped 😁!

  • @tech_cookie4445
    @tech_cookie4445 Před rokem

    Does this work on mobile

  • @Obongus602
    @Obongus602 Před 5 měsíci

    ohh this is so nice u deserve a like.

  • @user-nu4es7dx2y
    @user-nu4es7dx2y Před 9 měsíci +1

    god only existed in java and not bedrock ssaadd:(

  • @arnavdhawade9973
    @arnavdhawade9973 Před 10 měsíci

    Why can't my chest be locked it just opens

  • @Vxz.89
    @Vxz.89 Před rokem

    is that working in mcpe?

  • @brennosxavier6643
    @brennosxavier6643 Před 9 měsíci

    Thanks

  • @arnavdhawade9973
    @arnavdhawade9973 Před 10 měsíci

    The command dosent have a problem but it just opens

  • @Teapot_Man
    @Teapot_Man Před měsícem

    Is there a way to unlock the chest with commands?

  • @fivenightsatfreddys6859
    @fivenightsatfreddys6859 Před 7 měsíci

    The command is there but it doesn't work tho

  • @fivenightsatfreddys6859
    @fivenightsatfreddys6859 Před 7 měsíci

    Cool tho that yours works

  • @aminegamerzyt
    @aminegamerzyt Před rokem +1

    Hi nice 👍👍👍🙂🙂🙂 video

    • @undermycap
      @undermycap  Před rokem +2

      Thank you! It’s a really cool feature of chests, Have a great day!

  • @steepercreve
    @steepercreve Před rokem +16

    If you break the locked chest, will it drop the contained items?

    • @Malkontent1003
      @Malkontent1003 Před rokem

      It's said in the video, my guy. XD

    • @steepercreve
      @steepercreve Před rokem +1

      @@Malkontent1003 it wasn't clear and I was just asking tk make sure so maybe don't next time. :)

    • @Malkontent1003
      @Malkontent1003 Před rokem

      @@steepercreve Bruh, it's literally IN THE VIDEO.

    • @dehydrationmonster66
      @dehydrationmonster66 Před 11 měsíci +1

      Yes

    • @steepercreve
      @steepercreve Před 11 měsíci +1

      It would've been simpler to just day yes when I asked.

  • @fuxina7787
    @fuxina7787 Před rokem

    it says "the target block is not block entity " for me when i type the command help pls

    • @paperbear03
      @paperbear03 Před rokem

      i think ur coordinates are wrong or smt, that reply means that the targeted block cant be locked

    • @A_Nany
      @A_Nany Před rokem

      @@paperbear03 I am using the right coordinate and even so the code isn't working

  • @issacthegamer12357
    @issacthegamer12357 Před 5 měsíci +1

    It's not working

  • @hoodiekeleton89
    @hoodiekeleton89 Před rokem

    Does this also work with barrels?

  • @cheesecakeisntgood6504
    @cheesecakeisntgood6504 Před 6 měsíci

    the /data command doesnt exist in bedrock

  • @Breakingaether
    @Breakingaether Před 6 měsíci

    Its not working for me ive done exactly what u said and its not working
    The chest wont lock

    • @jarvispoulton9652
      @jarvispoulton9652 Před měsícem

      If you’re on bedrock it doesn’t work

    • @Breakingaether
      @Breakingaether Před měsícem

      @@jarvispoulton9652 I posted that comment so long ago I can't even remember which one I was on

  • @Baconyy33
    @Baconyy33 Před rokem

    “SimPly JuSt BrEAk tHE cHeSt”

  • @Yahyagame34
    @Yahyagame34 Před 2 měsíci

    I can break the chest and take all the items

  • @deeznucz8639
    @deeznucz8639 Před rokem

    Is is posslible to lock any block you want?

  • @uno_fn
    @uno_fn Před rokem

    Me: looking for interesting minecraft things.
    UnderMyCap: Comes in with another epic command.
    thx this was so cool! lets get him to 10k subs by the end of july!

  • @alexstreit8257
    @alexstreit8257 Před měsícem

    thank you

    • @undermycap
      @undermycap  Před měsícem

      You're welcome! Have an awesome day!

  • @RyansColoradoRailProductions

    Locked chest from April Fools 2011 is real now

  • @zekoplayerx
    @zekoplayerx Před rokem

    ThankS

  • @trashpanda5599
    @trashpanda5599 Před rokem

    New video👀

  • @chrissymckenna9489
    @chrissymckenna9489 Před 6 měsíci

    **cries in bedrock**

  • @susgaming711
    @susgaming711 Před rokem +1

    and also can you show the command in the desc

    • @undermycap
      @undermycap  Před rokem +1

      Hello! Thank you so much for reminding me, I have placed the command into the description now. I forgot to place it in before 😀. Have an Awesome day!

  • @Axe_is_good
    @Axe_is_good Před rokem

    does this work with dubble chests?

    • @undermycap
      @undermycap  Před rokem +1

      Hello, it should work. If not I think you would need to do the command twice one for the left block then the right 😁. Have an awesome day!

    • @Axe_is_good
      @Axe_is_good Před rokem

      @@undermycap thanks

    • @undermycap
      @undermycap  Před rokem

      All good 👍

  • @iAowe
    @iAowe Před rokem

    Doesn't work for Xbox

  • @Mommy_J
    @Mommy_J Před 9 měsíci

    Does it actually work on servers?

  • @X-Not_Zero-X
    @X-Not_Zero-X Před rokem

    Can I get Java on mobile?

    • @undermycap
      @undermycap  Před rokem

      Hello 😀! Unfortunately java is not able to be played on java as it’s not built for mobile devices.

  • @Googleissmart-iq5uv
    @Googleissmart-iq5uv Před 9 měsíci +1

    /data merge blocks ~ ~ ~ {Lock:"your lock code"} is the right code. The other quotation marks dont work atleast for me.

    • @portableprodigy1337
      @portableprodigy1337 Před 4 měsíci

      Thank you! I don't understand what's the difference but this is the only option that worked for me.

  • @Vincent-vk5eo
    @Vincent-vk5eo Před rokem

    Is there a way to undo this command?

    • @undermycap
      @undermycap  Před rokem

      Hello if you break the chest and place it, it will disappear 😀

    • @QwertyNotFound
      @QwertyNotFound Před rokem

      i think you can use /data remove block ~ ~ ~ im not so sure tho

  • @susgaming711
    @susgaming711 Před rokem

    I found the secret cap

  • @moonkilleryt6150
    @moonkilleryt6150 Před rokem

    it in 1.14 or 1.15

    • @undermycap
      @undermycap  Před rokem

      Hello I’m pretty sure this is Available all the way down to maybe 1.13 as the commands structures all changed after that update 😀. Have a great day!

  • @KyleonaMedley-hh3et
    @KyleonaMedley-hh3et Před 2 měsíci

    It didn’t work it said unknown command

    • @flurple6921
      @flurple6921 Před měsícem

      need to enable cheats

    • @ulitie
      @ulitie Před měsícem

      @@flurple6921 I have cheats enabled and it doesn't work, it shows red when I type the lock type

    • @flurple6921
      @flurple6921 Před měsícem

      @@ulitie try going creative first, do this, then go back to survival

  • @PotBorTheCommunityShopKeeper

    Thats not the locked chest im talking about
    I meant the april fools one

  • @asasworld2539
    @asasworld2539 Před 3 měsíci

    it didn't work even tho I was on java edition

  • @20Aleksa08
    @20Aleksa08 Před rokem +2

    Can you make a block unbreakable???
    If you can that could be the colution to this👍👍👍

    • @undermycap
      @undermycap  Před rokem +3

      I’m not to sure. The only way I think you could make it unbreakable is if you set your game mode to adventure.

    • @20Aleksa08
      @20Aleksa08 Před rokem +1

      @@undermycap maybe you could make a command block that turns your gamemode to adventure when you enter a certain area

    • @undermycap
      @undermycap  Před rokem +1

      That could work you would have to use some sort of tag like distance to test for it. I think you could do /execute at @a[distance=..10] run game mode adventure in a command block which will set players in a range of 10 to adventure 😀.

    • @20Aleksa08
      @20Aleksa08 Před rokem +1

      @@undermycap ok, thanks, im not good with commands so i barely understood you though

    • @20Aleksa08
      @20Aleksa08 Před rokem +1

      @@undermycap but if i ever need that i could come back to you for help

  • @jattyorrell2046
    @jattyorrell2046 Před rokem

    I cant even do it

  • @johann_kili694
    @johann_kili694 Před rokem +2

    for everyone to copy:
    /data merge block 22 73 -10 {Lock:"key"}

  • @gamekingyeti
    @gamekingyeti Před rokem

    i found the hidden cap

  • @lovethegalaxy1019
    @lovethegalaxy1019 Před rokem

    -301, 71, -64

  • @jarvispoulton9652
    @jarvispoulton9652 Před měsícem

    I hate bedrock edition :(

  • @phoenixandfacerpclub2684
    @phoenixandfacerpclub2684 Před 8 měsíci

    2 -60 -1

  • @lollol8324
    @lollol8324 Před rokem

    712 69 636