|
Post by redlordgaming on Dec 16, 2013 4:05:40 GMT
Okay, so you know the /testfor and /testforblock command? If so, you know how the /testfor block can be used for both relative coords and for specific coords? Well, is there any way to do the relative with /testforblock? What I need to do is have a command block be able to output a redstone signal whenever a certain block is on the map, and I really don't want to place one command block for ever coord on the map. Thanks! -Red
|
|
|
Post by redlordgaming on Dec 20, 2013 16:39:51 GMT
Nobody knows? I'm doomed...
|
|
|
Post by danariel on Dec 29, 2013 23:34:28 GMT
I think: - testfor is to test players - testforblocks is to test blocks, but 1 at a time I don't think its possible, with command blocks, to test all the blocks in the map (or in a radius) to test if one changed
|
|
|
Post by redlordgaming on Dec 30, 2013 17:45:40 GMT
Okay, that makes sense now that I think about it. Players move, so that's why testfor is relative, but blocks don't move, so testforblock doesn't have relative. Thanks a bunch!
|
|
|
Post by Xisuma on Jan 21, 2014 17:45:02 GMT
You can use relative coords on: - testforblock - testfor - tellraw - (Many more commands) for testforblock: - /testforblock ~() ~() ~() OR () () () for testfor: - /testfor ~() ~() ~() OR () () () If you are just testing the entire world for a block then that is something different. Using testfor is for players so you can just testfor @p or @a[conditions] Using testforblock does not work because you cannot enter specific data like R=3 or something. Testfor had a special data usage where the command is: /testfor <player>[conditions of data] You can put in r=3 gm=2, all of this information is not enterable into /testforblock Testforblock does not have a special data usage where the command is: /testforblock <x> <y> <z>, in testfor it does not have a special coord location enter, that must be entered in the data usage compiler. Hope this helps you -Xisuma
|
|
|
Post by redlordgaming on Jan 23, 2014 11:13:12 GMT
Thanks for that everyone, I am going to figure something out.. Or just program one command block for every single spot on my map. Either way. -Red
|
|
|
Post by anonim on Dec 9, 2014 21:57:05 GMT
Okay, so you know the /testfor and /testforblock command? If so, you know how the /testfor block can be used for both relative coords and for specific coords? Well, is there any way to do the relative with /testforblock? What I need to do is have a command block be able to output a redstone signal whenever a certain block is on the map, and I really don't want to place one command block for ever coord on the map. Thanks! -Red now you can use the new fill command in 1.8 with that command you can replace blocks you want with another
|
|
|
Post by kscoutb on Dec 16, 2014 1:39:22 GMT
If you wish to see if a block has been placed anywhere maybe your thinking about it the wrong way. It seems the easier solution would be to test if a player has placed that block instead of if that block is actually present. Ex. If you use "/scoreboard objectives add glasspane stat.useItem.minecraft.glass_pane. Then if you worry about a player removing and replacing the block have a command block clocked removing 1 from the glass pane stat for every glass pane broken.
Hope that helps
|
|