1

Command Block Help!

boxdobo's Avatar boxdobo7/4/15 7:48 pm
1 emeralds 345 4
7/16/2015 6:38 pm
SquidMannn's Avatar SquidMannn
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's Avatar
boxdobo
Level 1 : New Miner
0

Create an account or sign in to comment.

4

1
07/16/2015 6:38 pm
Level 19 : Journeyman Robot
SquidMannn
SquidMannn's Avatar
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
07/06/2015 4:13 pm
Level 17 : Journeyman Engineer
Argagaes
Argagaes's Avatar
This should do the trick:
testfor @e[type=Item,r=30] {Item:{id:minecraft:rotten_flesh,Count:4b}}
1
07/05/2015 9:22 am
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
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
07/04/2015 8:39 pm
Level 55 : Grandmaster Dragon
Skitto493
Skitto493's Avatar
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]
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome