Interacting - flick a lever. #1744
-
I want to have it start a farm, to do so it just needs to flick the lever. Are there commands to 1. Find the lever, and 2.flick the lever? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
You might be able to do so using the |
Beta Was this translation helpful? Give feedback.
You would need to write a C# script, but I'm not sure if there is a way to retrieve the state of the lever currently.OK I misread your question, you want to flip the lever, not watch for it and run an action in MCC, see answer below.Example of script: sample-script-with-world-access.cs (lamp state can be retrieved in 1.12 and lower at the moment)
You might be able to do so using the
/useblock
command, however I'm not sure you can look for a certain block type at the moment, you would need to open the game first and take not of the exact coordinates.