2

I'm currently working on some maps, but I always find myself lost when I'm trying to find a specific item in a slot in my inventory.

This time it's the head, which is 103b. Currently, I don't have any way to check for it, so all I'm doing is checking for a skull, which makes it easy to bypass.

Here is an example:

/scoreboard players set @a Hulk 1 {Inventory:[{Slot:103b,id:"minecraft:skull"}]}

This is an easy way to find the skull, but I want it to be more specific. For example, a skull with a name, enchantments, etc.

This is the specific item I'm looking for:

/give @p minecraft:skull 1 3 {HideFlags:1,display:{Name:"The Hulk",Lore:[The head of the Hulk]},SkullOwner:Oconna,ench:[{id:0,lvl:10}]}

But since I can't copy {HideFlags:1,display:{Name:"The Hulk",Lore:[The head of the Hulk]},SkullOwner:Oconna,ench:[{id:0,lvl:10}]} into the other command (which would result in this):

/scoreboard players set @a Hulk 1 {HideFlags:1,display:{Name:"The Hulk",Lore:[The head of the Hulk]},SkullOwner:Oconna,ench:[{id:0,lvl:10}]}

I can't find it easily.

Is there any way to easily find a head with specific attributes, or do I need to type it all down?

2
  • 1
    I don't really understand what you're trying to do. Can you edit your question to better explain the problem you're having?
    – MBraedley
    Sep 22 '15 at 14:42
  • If needed i can provide the full machine i have. In a schematic ofc :)
    – Marcus13F
    Sep 22 '15 at 14:57
1

The item-specific data is stored in the tag tag, meaning you'll have to add

tag:{HideFlags:1,display:{Name:"The Hulk",Lore:[The head of the Hulk]},SkullOwner:Oconna,ench:[{id:0,lvl:10}]}

to the id and Slot tags in the scoreboard command (cf. Item Structure), as shown below.

/scoreboard players set @a Hulk 1 
{
    Inventory:[
    {
        Slot:103b,
        id:"minecraft:skull",
        tag:
        {
            HideFlags:1,
            display:{Name:"The Hulk",Lore:[The head of the Hulk]},
            SkullOwner:Oconna,
            ench:[{id:0,lvl:10}]
        }
    }]
}

Non-exploded view for copy-pasting:

/scoreboard players set @a Hulk 1 {Inventory:[{Slot:103b,id:"minecraft:skull",tag:{HideFlags:1,display:{Name:"The Hulk",Lore:[The head of the Hulk]},SkullOwner:Oconna,ench:[{id:0,lvl:10}]}}]}
2
  • 1
    Thanks alot for the answer. But is there any way to find this automatically? By this i mean, is there any command like /tagtest so i can get the item tag from the item im holding?
    – Marcus13F
    Sep 22 '15 at 17:27
  • Sorry for being a stupid kid. But im just wondering ¯_(ツ)_/¯. I think i have figured it out either way thought.
    – Marcus13F
    Sep 22 '15 at 17:50

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