0

I'm making a map in Minecraft with some custom crafting recipes that yield special items that deal with fighting. I know how to do that just fine, but I also want to add a bonus if one is wearing, say, a full set of "emerald armor." For example, if the player is wearing the full set, they would receive jump boost. So my question to you is: how do I detect if a player is wearing a specific set of gear? I know how to detect if a player is wearing a specific item with scoreboard and whatnot, but how do I combine those commands for a full set?

2

I know how to detect if a player is wearing a specific item with scoreboard and whatnot, but how do I combine those commands for a full set?

You could either put all of the data tags into one scoreboard objective, like this:

/scoreboard players set @a FullEmerald 0
/scoreboard players set @a FullEmerald 1 {Inventory:[{Slot:103b,<Helmet tags>},{Slot:102b,<Chestplate tags>}},{Slot:101b,<Leggings tags>}},{Slot:100b,<Boots tags>}}]}

Or, alternatively, set up an objective for each of the specific items, then combine them like:

@a[score_HelmetEmerald_min=1,score_ChestplateEmerald_min=1,score_LeggingsEmerald_min=1,score_BootsEmerald_min=1]

The second method would also really be better if you've already got objectives for each of the individual armor pieces (e.g: each piece individually has powers).

  • 1
    Why aren't you using a tag instead? That's the typical implementation for booleans these days. – MBraedley Jun 11 '16 at 0:58
  • 1
    @MBraedley I prefer to still use scoreboard objectives for item-holding/armor-wearing because you can't combine tags as easily (only one tag= works in a selector). Tags would also work for the first method though, just depends on what else needs to be done with it. – SirBenet Jun 11 '16 at 1:00
  • Never thought about it that way, thank you. I have now completed what I have decided to call the "Emerald Knight," and it's really fun :) – icebuilder789 Jun 12 '16 at 3:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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