Skip to main content
added 11 characters in body; edited title
Source Link
Akidus
  • 239
  • 2
  • 13

Right click detection on a block (No item on hand) Minecraft

How can I modify this code to detect a right click when right-clicking a specific block only, without any item in a player hand? This is not like others, for I am not using an Item or I am not right-clicking any object. Just a specific one like a torch, to act like a button. I can use scorebords with this though.

/scoreboard players set @e[type=ArmorStand,name=Activated] action 1 {Equipment:[{},{},{},{},{}]}
/scoreboard players set @e[type=ArmorStand,name=Activated] action 0 {Equipment:[{id:"minecraft:carpet"},{},{­},{},{}]}
/execute @e[name=Activated,score_action_min=1] ~ ~ ~ /setblock XYZ-Coordinates redstone_block
/execute @e[name=Activated,score_action=0] ~ ~ ~ /setblock Same XYZ-Coordinates air

Right click detection on a block (No item on hand)

How can I modify this code to detect a right click when right-clicking a specific block only, without any item in a player hand? This is not like others, for I am not using an Item or I am not right-clicking any object. Just a specific one like a torch, to act like a button.

/scoreboard players set @e[type=ArmorStand,name=Activated] action 1 {Equipment:[{},{},{},{},{}]}
/scoreboard players set @e[type=ArmorStand,name=Activated] action 0 {Equipment:[{id:"minecraft:carpet"},{},{­},{},{}]}
/execute @e[name=Activated,score_action_min=1] ~ ~ ~ /setblock XYZ-Coordinates redstone_block
/execute @e[name=Activated,score_action=0] ~ ~ ~ /setblock Same XYZ-Coordinates air

Right click detection on a block (No item on hand) Minecraft

How can I modify this code to detect a right click when right-clicking a specific block only, without any item in a player hand? This is not like others, for I am not using an Item or I am not right-clicking any object. Just a specific one like a torch, to act like a button. I can use scorebords with this though.

/scoreboard players set @e[type=ArmorStand,name=Activated] action 1 {Equipment:[{},{},{},{},{}]}
/scoreboard players set @e[type=ArmorStand,name=Activated] action 0 {Equipment:[{id:"minecraft:carpet"},{},{­},{},{}]}
/execute @e[name=Activated,score_action_min=1] ~ ~ ~ /setblock XYZ-Coordinates redstone_block
/execute @e[name=Activated,score_action=0] ~ ~ ~ /setblock Same XYZ-Coordinates air
Source Link
Akidus
  • 239
  • 2
  • 13

Right click detection on a block (No item on hand)

How can I modify this code to detect a right click when right-clicking a specific block only, without any item in a player hand? This is not like others, for I am not using an Item or I am not right-clicking any object. Just a specific one like a torch, to act like a button.

/scoreboard players set @e[type=ArmorStand,name=Activated] action 1 {Equipment:[{},{},{},{},{}]}
/scoreboard players set @e[type=ArmorStand,name=Activated] action 0 {Equipment:[{id:"minecraft:carpet"},{},{­},{},{}]}
/execute @e[name=Activated,score_action_min=1] ~ ~ ~ /setblock XYZ-Coordinates redstone_block
/execute @e[name=Activated,score_action=0] ~ ~ ~ /setblock Same XYZ-Coordinates air