1

Command Block Help!

boxdobo 7/4/15 7:48 pm
385
7/16/2015 6:38 pm
im trying to make an arena. im trying to /testfor 4 rotten flesh but its not working.
im usiing
testfor @e[r=30,type=Item] {Item:{id:minecraft:rotten_flesh}} 4
but it says in the "previous output box"
Data tag parsing failed: Unbalanced curly brackets {}: Item:{id:minecraft:rotten_flesh}}
someone plz help!
Posted by
boxdobo
Level 1 : New Miner
0

  Have something to say?

JoinSign in

4

SquidMannn
07/16/2015 6:38 pm
Level 19 : Journeyman Robot
The best way of doing this type of thing is making a clock (Preferably a 20hz fill clock) and adding a command block with the command /scoreboard players set @a Testfor 1 {Item{id:"minecraft:rotten_flesh,Count:4b"}} then another command with this command /execute @a[score_Testfor_min=1,score_Testfor=1] ~ ~ ~ [Insert output command here] Then add a scoreboard called Testfor using /scoreboard objectives add Testfor dummy
1
Argagaes
07/06/2015 4:13 pm
Level 17 : Journeyman System
This should do the trick:
testfor @e[type=Item,r=30] {Item:{id:minecraft:rotten_flesh,Count:4b}}
1
Jmal116
07/05/2015 9:22 am
Level 34 : Artisan System
You actually can use them on /testfor, however you can't test for specific numbers of things just by adding '4' to the end of the command.

I'm not sure if just adding the 'Count' to the data structure like Skitto did will work, but if it does then go ahead and use that. Otherwise, you'll want to use the signal strength the comparator outputs, as it will output one for each piece of flesh it finds. So when it outputs a strength of 4, then it's found 4.
1
Skitto493
07/04/2015 8:39 pm
Level 55 : Grandmaster Dragon
You cannot use datatags on /testfor.

You can however, use them on /scoreboard.

/scoreboard players set @e[r=30,type=Item] OBJECTIVE 1 {Item:{id:minecraft:rotten_flesh,Count:4}}

This will set the OBJECTIVE of stacks of 4 zombie flesh to 1

Then you can do /testfor @e[score_OBJECTIVE_min=1]
1

Welcome