Membership: / @infernaldevice
Ep380: Cool sci-fi double doors that slide open with a satisfying sound. Great for labs or spaceships.
00:00 Intro
00:45 Setup
01:30 Create doors
08:55 Controller - input
21:10 Controller - animation
Version: 1.21
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 state dummy
Create:
IUN: summon block_display 10052 56 10049 {Tags:["slide_door"], block_state:{Name:"light_gray_stained_glass_pane", Properties:{north:"true", south:"true"}},
transformation:{left_rotation:[0f,0f,0f,1f], right_rotation:[0f,0f,0f,1f], translation:[-0.5f,0f,-0.5f], scale:[1f,2f,1f]}, Rotation:[180f,0f], brightness:{sky:15, block:15},
Passengers:[{Tags:["slide_door"], id:"interaction", width:1.01, height:2}]}
CUA: summon block_display 10052 56 10050 {Tags:["slide_door"], block_state:{Name:"light_gray_stained_glass_pane", Properties:{north:"true", south:"true"}},
transformation:{left_rotation:[0f,0f,0f,1f], right_rotation:[0f,0f,0f,1f], translation:[-0.5f,0f,-0.5f], scale:[1f,2f,1f]}, Rotation:[0f,0f], brightness:{sky:15, block:15},
Passengers:[{Tags:["slide_door"], id:"interaction", width:1.01, height:2}]}
CUA: fill 10052 57 10050 10052 56 10049 barrier
Controller - Input:
RUA: execute as @e[type=interaction, tag=slide_door, tag=!in_use] at @s on target run tag @e[type=interaction, tag=slide_door, sort=nearest, limit=2] add in_use
CCA: execute as @e[type=interaction, tag=in_use] store success score @s state if score @s state matches 0
CUA: execute as @e[type=interaction, tag=in_use, scores={state=0}] run data merge entity @s {width:0.99}
CCA: execute at @e[type=interaction, tag=in_use] run fill ~ ~ ~ ~ ~1 ~ air replace barrier
CUA: execute as @e[type=interaction, tag=in_use, scores={state=1}] run data merge entity @s {width:1.01}
CCA: execute at @e[type=interaction, tag=in_use] run fill ~ ~ ~ ~ ~1 ~ barrier replace air
CUA: execute as @e[type=interaction, tag=in_use] run data remove entity @s interaction
CCA: setblock 10063 56 10046 redstone_block
CCA: execute at @e[type=interaction, tag=in_use] run playsound entity.breeze.inhale master @a ~ ~ ~ 0.2 0.7 0
Controller - Anim:
RUA: scoreboard players add .door state 1
CUA: execute if score .door state matches 1..20 as @e[type=interaction, scores={state=0}, tag=in_use] on vehicle at @s run tp @s ^ ^ ^0.04
CUA: execute if score .door state matches 1..20 as @e[type=interaction, scores={state=1}, tag=in_use] on vehicle at @s run tp @s ^ ^ ^-0.04
CUA: execute if score .door state matches 20.. run setblock ~ ~ ~-4 white_wool
CCA: tag @e[type=interaction, tag=in_use] remove in_use
CCA: scoreboard players reset .door state