r/MinecraftCommands • • 5d ago

Help | Java 26.3 Help with Interaction Entity

hi, i want to create a command block door for a map i'm making, i want to use the interaction entity to have it be openable by a player, i am attempting to follow various tutorials and post from here but i can't make the interaction dissapear, i am in Minecraft version 26.3

here is my set up

the top command block is set to chain/unconditional/always active, with this command:

execute as (@)e[tag=door] at (@)s run data remove entity (@)s interaction

the bottom Command block is set to repear/unconditional/need redstone, with this command:

execute as (@)e[tag=door] if data entity (@)s interaction at (@)s run say knock

the summon CB is set up with this command:

/summon interaction 104.15 -24 431 {width:3.2f,height:4f,Tags:["door","wooden","west"]}

note 1: the () parethesis is there just for reddit, ingame it's set up correctly

Note 2:the summon command block maybe has some unnecesary informtion, that is because i was following a tutorial and copypasted the same commands

2 Upvotes

2 comments sorted by

2

u/Available-Squash1021 5d ago

two things stand out. the repeat block is on needs redstone, so unless something is actually powering it, it never runs at all. flip it to always active.

second, a chain block only fires when the command block behind it points its arrow into it. sitting on its own it does nothing, even on always active. so make it one line: repeat block with the say knock check, then the chain block right in front of its arrow with the data remove entity @s interaction command. the check runs, the click data gets wiped the same tick, and it knocks once per click instead of either never or forever.

the extra tags in the summon are fine btw, they just ride along unused like most tutorial leftovers

1

u/Ericristian_bros Command Experienced 5d ago

https://minecraftcommands.github.io/wiki/questions/itemclick#interaction-entity

# Setup
summon minecraft:interaction ~ ~ ~ {Tags:["click_scan"],width:0.5f,height:0.5f}

# Command blocks
execute as @e[type=interaction,tag=click_scan] store success entity @s attack.player[] int 0 on attacker run say Left Click!
execute as @e[type=interaction,tag=click_scan] store success entity @s interaction.player[] int 0 on target run say Right Click!