376: Animated key for locked door. [Minecraft Map Making]

Subscribers:
3,860
Published on ● Video Link: https://www.youtube.com/watch?v=8zM-Iq5bLIw



Minecraft
Game:
Minecraft (2011)
Duration: 38:58
331 views
29


Membership:    / @infernaldevice  
Ep376: Making unlocking a door a bit more interesting by animating the key.

00:00 Intro
01:35 Setup
02:00 Give key
04:05 Reset
06:30 Controller

Version: 1.21

Suggestions from: GalSergey, Hasan Topcu

GalSergey locked doors datapack: https://modrinth.com/datapack/door_lo...

Commands, builds and ideas for people making their own Minecraft maps.

Check out my collabs on Coppit's channel:    / coppitj  

Join the CoppitCraft server that I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord:   / discord  

The following commands are prefixed with three letters which represent the settings of the command block. E.g IUN: = Impulse Unconditional Needs_Redstone. These prefixes need to be removed if copying the commands.

Since angled brackets are not allowed in YouTube descriptions you will have to replace "greater than" and "less than" with the appropriate angled bracket.

Commands used:

Setup:
IUN: scoreboard objectives add key_check dummy

Give Key:
IUN: give @p tripwire_hook[item_name='"Key: Garage"', custom_data={key:door}]

Reset:
IUN: summon interaction 10025 56 10064 {Tags:["door"], width:1.01, height:2}
CUA: setblock 10025 55 10063 pink_wool

Controller - door:
RUA: execute as @e[type=interaction,tag=door] store success score @s key_check on target if items entity @s weapon.mainhand tripwire_hook[minecraft:custom_data~{key:door}]
CUA: execute as @e[type=interaction,tag=door,scores={key_check=0}] on target run tellraw @s {"text":"You need a key!"}
CUA: execute at @e[type=interaction,tag=door,scores={key_check=0}] run playsound entity.zombie.attack_wooden_door master @a ~ ~ ~ 0.2 1 0
CUA: execute as @e[type=interaction,tag=door,scores={key_check=0}] run data remove entity @s interaction
CUA: execute at @e[type=interaction,tag=door,scores={key_check=1}] run setblock 10034 56 10066 redstone_block
CUA: execute as @e[type=interaction,tag=door,scores={key_check=1}] on target run item replace entity @s weapon.mainhand with air
CUA: scoreboard players reset @e[type=interaction,tag=door] key_check

Controller - key:
RUA: scoreboard players add door key_check 1
CUA: execute if score door key_check matches 1 at @e[type=interaction, tag=door] run summon item_display ~1 ~ ~ {Tags:["anim_key"], item:{id:"tripwire_hook"},transformation:{left_rotation:{axis:[0f,0f,1f], angle:4.71}, right_rotation:[0f,0f,0f,1f], translation:[0f,0.87f,0.25f], scale:[0.5f,0.5f,0.5f]}}
CCA: kill @e[type=interaction,tag=door]
CUA: execute if score door key_check matches 10 run data merge entity @e[tag=anim_key,limit=1] {transformation:{left_rotation:{axis:[0f,0f,1f], angle:4.71}, right_rotation:[0f,0f,0f,1f], translation:[-0.4f,0.87f,0.25f], scale:[0.5f,0.5f,0.5f]},start_interpolation:0, interpolation_duration:10}
CUA: execute if score door key_check matches 20 run data merge entity @e[tag=anim_key,limit=1] {transformation:{left_rotation:{axis:[0f,0f,1f], angle:4.71}, right_rotation:{axis:[0f,-1f,0f], angle:1.57}, translation:[-0.4f,0.87f,0.25f], scale:[0.5f,0.5f,0.5f]},start_interpolation:0, interpolation_duration:10}
CUA: execute if score door key_check matches 30.. run setblock 10025 55 10063 redstone_wall_torch[facing=north]
CCA: kill @e[tag=anim_key]
CCA: setblock 10034 56 10066 white_wool
CCA: scoreboard players reset door key_check







Tags:
minecraft
adventure map
map making
commands
command blocks
1.18
custom commands
redstone
map ideas
map suggesstions
custom maps
1.19



Other Statistics

Minecraft Statistics For Infernal Device

At present, Infernal Device has 182,428 views spread across 865 videos for Minecraft, accounting for over 10 days of watchable video on his channel. This is 94.82% of the total watchable video for Minecraft on Infernal Device's YouTube channel.