2

I want to test for a dropped Spruce Log, for example. So what I have is:

execute at @e[type=minecraft:item,name="spruce_log"] run summon minecraft:pig ~ ~ ~

I also tried:

execute at @e[type=minecraft:item,nbt={id:"spruce_log"}] run summon minecraft:pig ~ ~ ~

The pig summoning is just to see if it works. Which it doesn't. The Command Block doesn't give me any errors either. I just don't know how to test for the Spruce Log item, or any item in specific. I'm using Minecraft 1.13.1.

1
  • Try minecraft:item in quotation marks. And try minecraft: before the spruce_log. Commented Dec 2, 2018 at 23:24

1 Answer 1

4

You'll want to do this:

/execute at @e[type=item,nbt={Item:{id:"minecraft:spruce_log"}}] run summon minecraft:pig ~ ~ ~

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.