Test for item in output slot of furnace

Test for item in output slot of furnace - Photo of Clear Glass Measuring Cup Lot

When i put this command in a command block:

/testforblock ~ ~1 ~-3 minecraft:furnace 0 {Items:[{id:"minecraft:iron",Slot:1b}]}

It gave this error:

The block at 137,85,401 is Furnace (expected: Furnace).

And when i put this in the command block:

/testforblock ~ ~1 ~-3 minecraft:furnace {Items:[{id:"minecraft:iron",Slot:1b}]}

It gave this error:

'{Items:[{id:"minecraft:iron",Slot:1b}]}' is not a valid number

I'm trying to test for an iron ingot in the output slot. Anyone know how to do this?



Best Answer

There are two types of furnaces:

  1. furnace (furnace turned off)
  2. lit_furnace (Furnace when burning something)

The data Value has to be -1 or the actual rotation of the furnace (-1 means it does not matter).

So change your command to:

/testforblock x y z minecraft:lit_furnace -1

The output slot is 2b and iron is called iron_ingot:

/testforblock x y z minecraft:furnace -1 {Items:[{Slot:2b,id:"minecraft:iron_ingot"}]}
/testforblock x y z minecraft:lit_furnace -1 {Items:[{Slot:2b,id:"minecraft:iron_ingot"}]}

You would have to test if one of these testfors was successful (basically do your redstone 2 times, one for each command).

Source.




Pictures about "Test for item in output slot of furnace"

Test for item in output slot of furnace - Two Clear Glass Jars Beside Several Flasks
Test for item in output slot of furnace - Person Pouring Blue Liquid Into a Glass Container
Test for item in output slot of furnace - Chemical test with empty flask mounted on ring stand while burner under flask and tubes filled with reagents in modern lab








Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Rodolfo Clix, Pixabay, Ivan Samkov, RF._.studio