Well... The book and quill thing I have no idea if thats possible... But for any item you can use the /checkfor command or i might have said the command wrong... i dont do redstone and command blocks much...
There will always be that kind of a moment at least once in everyone's life. That moment when your sitting there listening to someone going down memory lane, but really not listening at all.
Well... The book and quill thing I have no idea if thats possible... But for any item you can use the /checkfor command or i might have said the command wrong... i dont do redstone and command blocks much...
It is possible. I saw someone else ask it once and someone posted a whole guide on how to do it but I can't find it for some reason.
Rollback Post to RevisionRollBack
"BEWARE the man who has nothing to lose, for he has only to gain."
The above checks for a golden ingot named "A shiny Penny" anywhere within the inventory. You can also use /clear, in which the dataTags start directly within the "tag" tag of the item format (same goes for /give):
Umm.... I don't understand the Inventory tag that you said above.
What are we supposed to do? Looks like a programming thing or something. Or am I just stupid?
That's the item format itself. The "Inventory" tag is a list (indicated by square brackets) that holds unnamed compound tags (indicated by curly brackets):
Inventory:[
{
[data]
},
{
[data]
},
{
[data]
}
]
The data that the "Inventory" tag holds are items that use the item format. So sticking the example item format into the "Inventory" tag:
Oh and another problem. When I put the command in the command block and push a button it doesn't work. It says /testfor <player> I copied the exact command that you suggested. I tried to put @p, @r but with no avail. I even put my player name but that didn't work. BTW is this in the snapshots?
Oh and another problem. When I put the command in the command block and push a button it doesn't work. It says /testfor I copied the exact command that you suggested. I tried to put @p, @r but with no avail. I even put my player name but that didn't work. BTW is this in the snapshots?
Yes, the /testfor command only has access to NBT data in 1.8+
Hmm.... It works the testfor but when I have two 'A shiny penny' in my inventory the command block with /clear @a minecraft:gold_ingot 0 0 {display:{Name:"A shiny Penny"}} it says the player has 2 items for the criteria or something like that. I don't get it?
Hmm.... It works the testfor but when I have two 'A shiny penny' in my inventory the command block with /clear @a minecraft:gold_ingot 0 0 {display:{Name:"A shiny Penny"}} it says the player has 2 items for the criteria or something like that. I don't get it?
If you set the "maximum amount" to 0, it will not remove any of the items. It will still produce a signal via a comparator if there are items found, so it is essentially the same as /testfor, while stating the number of items found (which has advanced usage with CommandStats).
Not trying to be mean or anything, but what exactly is the use of all this? What exactly is the use of targeting a player with a specific item in their inventory? Once again not trying to be mean or anything.
Exactly. I need to make a shop system. In the beginning of the map you have to pick a class. (Dwarf, Human, Elf). It gives you kit items and effects. What I'm not sure of is how to make the effects follow the person who pushed the button. The closest thing to it is doing @p but that would make it so that the closest person to the spawn would have the effects not the proper kit. This shop system is designed to upgrade these kits. A kit is upgraded by attack usually not defense. There is usually a weapon (axe-Dwarf,sword-Human,bow-elf) At first it's knockback and sharpness 1 and power 1 and punch 1 then when you start upgrading it upgrades it by 1. I know how to do all this. I'm just not sure how to do the effects going to the person who pushed the button. Can anyone help me?
There is an /effect command, just @p it to the player while they're getting their other class items. just make it last for a really long time and then maybe refresh the time when they go into any area that only their class can enter by putting a pressure plate in there that clears their effects and then gives them that class's effect again for a really long time.
Yes... That would work. Only problem is when you selected a class.. Well there is a downside to the solution. The adventure map that I'm doing will involve a lot of killing, and dying too. So, if you put a permanent effect on the person who pushed the button... It will be gone when you die. What I did is a command block saying /setblock ~ ~5 ~ redstone_block. 5 blocks higher there is a redstone block that will appear and next to it a command block saying /setblock ~1 ~ ~ redstone_block 0 destroy. (This makes an extremely fast clock.) Next to the rapidly breaking redstone block there will be a command block saying /effect @p 4 1 3. This makes it so when you go into your inventory you see the effect (mining fatigue) and it is always at 0. So it says Mining Fatigue for 0 seconds. This keeps on doing the effect because it is attached to a clock. Even after you die it keeps on doing the effect because clocks don't stop when you die :-P I need it so that there is a scoreboard command (/scoreboard teams set) with teams so that when you press the button a scoreboard team will be created and above where the breaking redstone block is there will be another command block with a command (testfor or scoreboard, I don't know) saying that only the certain team can have the effect. There will be a comparator after the command block with the /testfor or /scoreboard command that will lead to a command block that says /effect @p 4 1 3.
Or you could give each class a different spawnpoint with commands that spawns them in a small box which has a pressure plate with /effect @p 4 1 3 (Numbers of Homestucks The blind prophet) and then a button that teleports the player to the normal spawn location.
No.. that won't work at all.... It still wouldn't control that the closest player to the box gets the effect.... The only way I would think would work is /effect @p 4 1000000 3 then a command block with a redstone clock testforing that when the player dies who has the effect (4) it would give the effect to them again. Which I have no idea how to do. Maybe Skylinerw will have an idea :D.
And......
How do you target a player that has something specific written in a book and quill?
Thanks in advance for replies!
"BEWARE the man who has nothing to lose, for he has only to gain."
There will always be that kind of a moment at least once in everyone's life. That moment when your sitting there listening to someone going down memory lane, but really not listening at all.
It is possible. I saw someone else ask it once and someone posted a whole guide on how to do it but I can't find it for some reason.
"BEWARE the man who has nothing to lose, for he has only to gain."
http://www.minecraftforum.net/forums/minecraft-discussion/recent-updates-and-snapshots/375655-book-and-quil-username-change
i don't think thats what you were looking for but it might help.
and I got another link but I don't think it explains what your doing
http://www.minecraftforum.net/forums/mapping-and-modding/maps/maps-discussion/1560387-books-guide-tips-and-hacks
and I dont know if this works but try this
/clear @a minecraft:writable_book 0 0 {pages:["Code"]
/testfor @a {Inventory:[{id:minecraft:writable_book,tag:{pages:["Code"]}}]}
You'll check the "Inventory" tag (a list that stores compounds) while following the item format. Item format:
Within /testfor:
The above checks for a golden ingot named "A shiny Penny" anywhere within the inventory. You can also use /clear, in which the dataTags start directly within the "tag" tag of the item format (same goes for /give):
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
What are we supposed to do? Looks like a programming thing or something. Or am I just stupid?
That's the item format itself. The "Inventory" tag is a list (indicated by square brackets) that holds unnamed compound tags (indicated by curly brackets):
The data that the "Inventory" tag holds are items that use the item format. So sticking the example item format into the "Inventory" tag:
You can find more information on the item format here: http://minecraft.gamepedia.com/Player.dat_format#Item_structure
And more info on the NBT format itself here: http://minecraft.gamepedia.com/NBT_format
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Yes, the /testfor command only has access to NBT data in 1.8+
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
/clear command syntax:
If you set the "maximum amount" to 0, it will not remove any of the items. It will still produce a signal via a comparator if there are items found, so it is essentially the same as /testfor, while stating the number of items found (which has advanced usage with CommandStats).
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Understand why it's more complicated than @p?
Oh well... Did you understand at all?
Any help would be appreciated, Thanks.
HomestucksThe blind prophet) and then a button that teleports the player to the normal spawn location.Any help would be appreciated, Thanks.