1
Command Block Help!
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!
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!
Create an account or sign in to comment.
4
1
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
This should do the trick:
testfor @e[type=Item,r=30] {Item:{id:minecraft:rotten_flesh,Count:4b}}
testfor @e[type=Item,r=30] {Item:{id:minecraft:rotten_flesh,Count:4b}}
1
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.
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
You cannot use datatags on /testfor.
You can however, use them on /scoreboard.
This will set the OBJECTIVE of stacks of 4 zombie flesh to 1
Then you can do
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]