Entity Inventory Slot Detection

Entity Inventory Slot Detection - Free stock photo of adult, aisle, beard

I'm trying to use a command for a map I am creating and I need to test for if an armorstand by the name of Skeletor is wearing a golden helemet on its head. Here's the command I've been using:

/testfor @e[name=Skeletor,Inventory=[{Slot:103,id:golden_helemet}] 

but its says:

The entity UUID provided is in an invalid format.



Best Answer

The Inventory tag doesn't work on armor stands, but the Equipment tag does.

/testfor @e[name=Skeletor] {Equipment:[{id:"",Count:,tag:{}...},{id:,Count:...},{id:...},{id:},{id:}]}.

The five arguments come in this order: Held Item, Boots, Pants, Chestplate, Helmet. You want to test for boots, so I would try this command:

/testfor @e[name=Skeletor] {Equipment:[{},{},{},{},{id:golden_helmet}]}




Pictures about "Entity Inventory Slot Detection"

Entity Inventory Slot Detection - Free stock photo of aisle, architecture, beard
Entity Inventory Slot Detection - People in Store
Entity Inventory Slot Detection - Warehouse with Concrete Floors





onset vehicle inventory + entity detection




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

Images: cottonbro, cottonbro, cottonbro, Tiger Lily