Minecraft – Automatic item recognition

minecraft-java-edition

With hopper taking items from chest in specific order I could use the chest storage as a program tape for whatever programmable mechanism I would like to use it. I've made a simple circuit that clocks removing exactly one item from the chest, feed it to a dispenser and have the dispenser "dispense it" before further actions are taken.

What I want: I load the chest with a sequence of two or more types of items, and get redstone signal on selected output when given item in sequence is of specific type. Say, I load it with "arrow, cobble, cobble, arrow, arrow" and on five consecutive "clock pulses" of my redstone clock I'm getting "1, 0, 0, 1, 1" on redstone output of the whole circuit.

Now there's a problem with actually converting the item type to a specific redstone signal. I'm fairly aware there are rather few items that could be used for that, and almost none to do that at reasonable speed, or can be easily removed for another item.

  • I can dispense items that drop as entities onto a hopper and it will send redstone signal when the item passes through.
  • I could dispense minecarts on a piece of rail – and then use detector rail and cart re-collector (cactus+water+hopper) to retrieve them.
  • I could shoot arrows at wooden buttons. Five minutes to despawn.
  • I could dispense water or lava and recognize which it is by testing its reach, but getting rid of it will be a pain in the neck. The dispenser would need to retrieve them into a bucket then and then the bucket would need to be pulled out by a different hopper. This becomes hopelessly convoluted.

In general, how can I automate recognition of (even very few, very specific types of) items in entity form in vanilla Minecraft, in a reasonably serializable way?

Best Answer

This setup works:

enter image description here

One of your items is an arrow, the other is any non-dispensing item like redstone.

Arrows will fire and miss the tripwire. Items will hit it then burn up, triggering a signal. You can use the items you suggested: arrow, cobble, cobble, arrow and the desired signal will be generated (well, the inverse).