The Meaning of Life, the Universe, and Everything.
Location:
United States of America
Join Date:
12/28/2014
Posts:
49
Location:
United States of America
Minecraft:
Yoyoness_
PSN:
xXYoyonessXx
Member Details
I'm not entirely sure how to do this but try /testfor @e[(Specify the entity you're looking for)] on three different command blocks (Once for each item) on contant, really fast redstone clocks. Look up how to specify the entity on the web. (You are testing for the item entity, correct?)
-EDIT-
Try these commands in three seprate command blocks.
The Meaning of Life, the Universe, and Everything.
Location:
United States of America
Join Date:
12/28/2014
Posts:
49
Location:
United States of America
Minecraft:
Yoyoness_
PSN:
xXYoyonessXx
Member Details
Hmm, use the commands before just without the coordinate part and put comparators in front of them. Then place another command block and type /execute @e[type=Item] {Item{id:"(Item)"}} ~ ~ ~ (Command you want)
The first part should work but the second might not. If it doesn't, look up how to combine the data tag and the "@e[type=Item]" part.
I hope this helps and sorry if it doesn't.
-EDIT-
If you're looking to use testfor just to execute another command, don't. Just use the /entitydata command (Unless you had wanted to teleport the entities). /entity data can change item dataTags.
The only problem with this is that it targets all item entities and names them "Test" because you can't specify an exact item using /execute unless you're using a scoreboard. If you don't want to get complicated, go with what I said at first. If you don't understand scoreboards, look it up on the wiki or on youtube because it can get complicated.
The Meaning of Life, the Universe, and Everything.
Location:
United States of America
Join Date:
12/28/2014
Posts:
49
Location:
United States of America
Minecraft:
Yoyoness_
PSN:
xXYoyonessXx
Member Details
Check out my edit.
By the way, if you're going to use the scoreboard, make sure your objectives are dummies because making them anything else is weird and it can screw things up.
P.S. Do you know how to make a Guardian stand still without the NoAI:1 tag?
It absolutely does work. Set these up, in order, on a /fill clock and throw a redstone dust, iron bars, and a wooden pressure plate down and you will see a message similar to "[item.tile.fenceIron] I found my friends on the ground!" then the three items will disappear.
I have 6 command blocks: [ATTACHMENT 1]. When I throw the items down they stay there: [ATTACHMENT 2]. These are the commands: [ATTACHMENTS 3-8]. (View photos at: https://goo.gl/uleyjX) What am I doing wrong????????????
Relating to this topic. How do I detect a squid with a custom name? I've got /execute @e[type=Item,score_tileType_min=4,score_tileType=4,c=1] ~ ~ ~ give @p spawn_egg 1 94 {display:{Name:"Springtrap"}} and testfor @e[type=Squid] {display:{Name:"Springtrap"}} on my clock but it doesn't work. How would this work?
P.S. If you could add how to make it glow like an enchanted egg that would be awesome!!!
Hi. How do I testfor redstone, iron bars and a wooden pressure plate on the ground together? I've tried but it just won't work. Please help me!
That doesn't work. It detects the items anywhere in the world not together. I need them all on the same block close together.
I'm not entirely sure how to do this but try /testfor @e[(Specify the entity you're looking for)] on three different command blocks (Once for each item) on contant, really fast redstone clocks. Look up how to specify the entity on the web. (You are testing for the item entity, correct?)
-EDIT-
Try these commands in three seprate command blocks.
/testfor @e[type=Item,x=(Coordinate),y=(Coordinate),z=(Coordinate)] {Item:{id:"minecraft:redstone"}}
/testfor @e[type=Item,x=(Coordinate),y=(Coordinate),z=(Coordinate)] {Item:{id:"minecraft:iron_bars"}}
/testfor @e[type=Item,x=(Coordinate),y=(Coordinate),z=(Coordinate)] {Item:{id:"wooden_pressure_plate"}}
I'm not entirely sure if this will work, I didn't test it.
Yes. 3 items on the ground TOGETHER.
EDIT: I see your edit.
Did you see my edit?
I want them to be able to do it anywhere in the world not in just a specific place.
Hmm, use the commands before just without the coordinate part and put comparators in front of them. Then place another command block and type /execute @e[type=Item] {Item{id:"(Item)"}} ~ ~ ~ (Command you want)
The first part should work but the second might not. If it doesn't, look up how to combine the data tag and the "@e[type=Item]" part.
I hope this helps and sorry if it doesn't.
-EDIT-
If you're looking to use testfor just to execute another command, don't. Just use the /entitydata command (Unless you had wanted to teleport the entities). /entity data can change item dataTags.
Example:
/execute @e[type=Item] ~ ~ ~ (Or specific coordinates) entitydata @e[type=Item] {CustomName:Test}
The only problem with this is that it targets all item entities and names them "Test" because you can't specify an exact item using /execute unless you're using a scoreboard. If you don't want to get complicated, go with what I said at first. If you don't understand scoreboards, look it up on the wiki or on youtube because it can get complicated.
Hope this helps.
-xXYoyonessXx
You need to use a combination of /scoreboard and /execute:
First type this into chat:
/scoreboard objectives add tileType dummy
Now connect these to a clock:
/scoreboard players set @e[type=Item] tileType 1 {Item:{id:"minecraft:redstone",Count:1b}}
/scoreboard players set @e[type=Item] tileType 2 {Item:{id:"minecraft:iron_bars",Count:1b}}
/scoreboard players set @e[type=Item] tileType 3 {Item:{id:"minecraft:wooden_pressure_plate",Count:1b}}
/execute @e[type=Item,score_tileType_min=1,score_tileType=1] ~ ~ ~ execute @e[type=Item,score_tileType_min=2,score_tileType=2,r=1] ~ ~ ~ execute @e[type=Item,score_tileType_min=3,score_tileType=3,r=1] ~ ~ ~ scoreboard players set @e[type=Item,score_tileType_min=1,score_tileType=3,r=2] tileType 4
/execute @e[type=Item,score_tileType_min=4,score_tileType=4,c=1] ~ ~ ~ say I found my friends on the ground!
/kill @e[type=Item,score_tileType_min=4,score_tileType=4]
Replace the bold command with what you want to do when the items are found together.
Doesn't Work.
P.S. Do you know how to make a Guardian stand still without the NoAI:1 tag?
Check out my edit.
By the way, if you're going to use the scoreboard, make sure your objectives are dummies because making them anything else is weird and it can screw things up.
It absolutely does work. Set these up, in order, on a /fill clock and throw a redstone dust, iron bars, and a wooden pressure plate down and you will see a message similar to "[item.tile.fenceIron] I found my friends on the ground!" then the three items will disappear.
I just re did it and it still doesn't work. Run over the commands again and see if you have a typo or something.
I directly copied and pasted them into command blocks and it worked. What errors, if any, are you receiving? Are you running vanilla 1.8.7?
I'm running Optifine Ultra D6, Minecraft 1.8.7.
EDIT: I just tried it without optifine and it still doesn't work
I have 6 command blocks: [ATTACHMENT 1]. When I throw the items down they stay there: [ATTACHMENT 2]. These are the commands: [ATTACHMENTS 3-8]. (View photos at: https://goo.gl/uleyjX) What am I doing wrong????????????
See what the scoreboard is doing, type:
/scoreboard objectives setdisplay sidebar tileType
Also, I assume that your /fill commands are filling in either positive x or positive z?
My fill clock was facing negative x. I changed it and it worked fine! Thanks!!
Relating to this topic. How do I detect a squid with a custom name? I've got /execute @e[type=Item,score_tileType_min=4,score_tileType=4,c=1] ~ ~ ~ give @p spawn_egg 1 94 {display:{Name:"Springtrap"}} and testfor @e[type=Squid] {display:{Name:"Springtrap"}} on my clock but it doesn't work. How would this work?
P.S. If you could add how to make it glow like an enchanted egg that would be awesome!!!
hey do you like to be my frind
You can target the squid by name:
/execute @e[type=Squid,name=Springtrap] ~ ~ ~ insert the command you would have put after the testfor here.
Never use /testfor unless absolutely necessary.