Can an item frame that opens a door close it immediately after?
Solution 1:
The closest I got was about the equivalent timing of a button press. You'll need the following to accomplish it:
- Item Frame
- Redstone Dust
- Redstone Observer
- Redstone Comparator
- Redstone Repeater
The idea I ran with, was to utilize the locking feature of the repeater to delay the de-activation of the primary observer. The circuit looks like this:
Additional delay can be added by adding a secondary lock after the first set. The truly important note here is with regards to the redstone repeaters. The delay sequence is important:
- The repeater sending the signal to the door.
- This should have a delay of 2 ticks.
- The repeater receiving the primary observer signal.
- This should have a delay of 3 ticks.
- The repeater pointed at repeater 2.
- This should have a delay of 4 ticks.
You can adjust the delay of the repeaters by triggering the "use" functionality when aiming at them.
Solution 2:
Changing the state of an item frame would only be possible through commands (and even then not quite easy). What you can do in regular survival without cheats is:
- require a certain number of rotations, independent from initial position (observer watching redstone dust from a comparator, producing a pulse on every change), pass that to a counter.
- activate a delay circuit that will close the door after a certain period (allowing you to reset the frame manually - even if you leave it in the correct position and come back later, you'll need to reset it before setting it right)
- activate a dispenser with some kind of projectiles (like snowballs) to shoot the item frame, in result ejecting the item from it and making it drop to the floor (where you may try to collect it with hoppers, or just leave it to despawn.)