Skip to main content
1 of 3
MrLemon
  • 17.4k
  • 6
  • 60
  • 83

The problem is that you are looking for a player within a radius of 10 of the command block, standing inside a dropper with specific items in it. That won't do.

What you want to do is keep the villager alive. Let me back up a little. You want to use an armor stand instead, they are the gold standard for use as entity markers for commands, due to the Marker, NoGravity and Invisible tags.

Now that you are using an armorstand, don't kill it, and use the following command to detect the dropper:

execute @e[type=ArmorStand,name=Test] ~ ~ ~ testforblock ...

The armorstand serves to save arbitrary coordinates and execute from there, similar to how you create the dropper at an arbitrary place.


It doesn't really matter if the player is within 10 blocks, but if you really want to, you can daisy-chain execute commands

execute @a ~ ~ ~ execute @e[type=ArmorStand,name=Test,r=10] ~ ~ ~ testforblock ...

This will run the second execute (and everything beyond) only if the armorstand is within 10 blocks of any player.

MrLemon
  • 17.4k
  • 6
  • 60
  • 83