This will probably work:
/replaceitem entity <selector> <slot> <item> [amount]
(entity is not a placeholder)
In the above command:
<selector>
must be a player name or entity selector.
<slot>
is the inventory slot where the item must be placed (see below).
<item>
is the item ID (e.g. minecraft:golden_sword).
[amount]
is the how many of the items to stack (must be between 0 and 65, but is optional).
Slots for mobs include:
slot.armor.chest
slot.armor.feet
slot.armor.head
slot.armor.legs
slot.weapon.mainhand
slot.weapon.offhand
Remember, not all mobs will show or make use of the added item. A spider might have a sword, but what is it supposed to do with it?
Oh, and how are you supposed to know which zombie/Rocket you want to mess with? Selectors in Minecraft are a bother, but they work. You'll probably have to give it a custom attribute, such as a name. Give a Summoned mob a name like so:
/summon Zombie x y z {CustomName:"Rocket",IsBaby:1b}
(I don't think you can use spaces for the selecting in the replaceitem command, so best just to use one word names for now. Even underscores can work.)
Now, to give it a sapling!
/replaceitem entity @e[name="Rocket"] slot.weapon.mainhand minecraft:sapling 4 1
There are more things you can do with this command, but I think that this is all you need for what you want to accomplish. I got this information from the Minecraft Gamepedia site for commands, and the more complicated stuff can also be found there.
You can not add pages. You can not add data to a specific element within the data tag with either of the data modifier commands.
A short quote from the dataTag section of both the blockdata and entitydata commands on the command wiki:
Specifies the data tag elements to be added to, or overwrite elements of
If you specify an element that is already in the data tag, it overwrites existing data.
You could use scoreboard tags as you can add/remove tags for each point in a nonlinear way without overwriting the existing tags.
The downside is having a book filled with clickEvents, some of which won't work until the player has the appropriate tag.
Best Answer
I checked, and
/setworldspawn
does change the compass immediately. Try running on a clock:if you encounter any problems, please leave a comment and I will look into it.