Hey guys I'm making a datapack for 1.20.1 together with some mods wherein if you shoot a locked door it will open. But the upper part of the door keeps breaking because it places the bottom one first and not on the same tick.
Tick, uised for detection.
Locked Door Functionality.
left / right
execute as @e[type=tacz:bullet] at @s if block ~-1 ~ ~ createdeco:locked_industrial_iron_door run say hi
execute as @e[type=tacz:bullet] at @s if block ~1 ~ ~ createdeco:locked_industrial_iron_door run say hi
front / back
execute as @e[type=tacz:bullet] at @s if block ~ ~ ~-1 createdeco:locked_industrial_iron_door run say hi
execute as @e[type=tacz:bullet] at @s if block ~ ~ ~1 createdeco:locked_industrial_iron_door run say hi
corners
execute as @e[type=tacz:bullet] at @s if block ~1 ~ ~-1 createdeco:locked_industrial_iron_door run say hi
execute as @e[type=tacz:bullet] at @s if block ~1 ~ ~1 createdeco:locked_industrial_iron_door run say hi
corners
execute as @e[type=tacz:bullet] at @s if block ~-1 ~ ~-1 createdeco:locked_industrial_iron_door run say hi
execute as @e[type=tacz:bullet] at @s if block ~-1 ~ ~1 createdeco:locked_industrial_iron_door run say hi
center
execute as @e[type=tacz:bullet] at @s if block ~ ~ ~ createdeco:locked_industrial_iron_door run say hi
Door open function
Open door
West
fill ~ ~ ~ ~3 ~3 ~3 red_wool replace createdeco:locked_industrial_iron_door[half=lower]
fill ~ ~ ~ ~3 ~3 ~3 blue_wool replace createdeco:locked_industrial_iron_door[half=upper]
fill ~ ~ ~ ~3 ~3 ~3 createdeco:locked_industrial_iron_door[facing=west,half=lower,open=true,powered=true] replace red_wool
fill ~ ~ ~ ~3 ~3 ~3 createdeco:locked_industrial_iron_door[facing=west,half=upper,open=true,powered=true] replace blue_wool