Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Help with /testforblock?


  • Please log in to reply
5 replies to this topic

#1

melancholicricebowl
  • Minecraft: XXXILift305

Posted 30 September 2013 - 03:41 AM

Hi all,

I'm making a minigame, and I am trying to use the /testforblock command to test if there is a crafting table at a location, and if there is it will output a signal.

The command I am using:

/testforblock ~ ~2 ~ minecraft:crafting_table

However, when I run it with a clock, it doesn't output a signal. Anyone have any suggestions?

Register or log in to remove.

#2

Skylinerw
    Skylinerw

    Sectional Moderator

  • Sectional Moderator
  • 3643 posts

Posted 30 September 2013 - 03:49 AM

View Postmelancholicricebowl, on 30 September 2013 - 03:41 AM, said:

Hi all,

I'm making a minigame, and I am trying to use the /testforblock command to test if there is a crafting table at a location, and if there is it will output a signal.

The command I am using:

/testforblock ~ ~2 ~ minecraft:crafting_table

However, when I run it with a clock, it doesn't output a signal. Anyone have any suggestions?

If you're using the speedy comparator clock, you'll need to extend the length of the wire before it reaches the command block. Otherwise you'll have to use a slower clock. If that's not the issue, then I'm unsure. The command itself works, but a comparator clock prevents the command block from firing as intended.

#3

Versepelles
  • Location: Oahu, Hawaii
  • Minecraft: VulpisNoctis

Posted 30 September 2013 - 05:48 AM

View PostSkylinerw, on 30 September 2013 - 03:49 AM, said:

If you're using the speedy comparator clock, you'll need to extend the length of the wire before it reaches the command block. Otherwise you'll have to use a slower clock. If that's not the issue, then I'm unsure. The command itself works, but a comparator clock prevents the command block from firing as intended.

Skylinerw is right; the command works as intended. However, if the clock is not your problem, maybe you could check your coordinates. Currently, you are checking 2 blocks above the location of the command block, rather than any horizontal direction. Also, you are checking with respect to the command block itself, not the player. Finally, make sure that the block you are testing for and the block you place match exactly; if you give yourself a minecraft:crafting_table with data value 1 and test for a minecraft:crafting_table with data value 0, the test for block command would not output a true signal (although it's pretty unlikely that this is the problem :P ).

Good luck!
Posted Image

#4

melancholicricebowl
  • Minecraft: XXXILift305

Posted 30 September 2013 - 03:57 PM

Looks like the comparator clock was too fast, thanks for the help guys!

#5

Minecraft139
  • Minecraft: Minecraft102396

Posted 01 October 2013 - 08:09 PM

View Postmelancholicricebowl, on 30 September 2013 - 03:57 PM, said:

Looks like the comparator clock was too fast, thanks for the help guys!
Actually, comparator clocks aren't too fast for the command block- if the command block is too close, the signal strength will switch between strengths of about 12-15 or something like that and somewhere around 1-3 (can't remember the exact numbers), so you just need to extend the wire. Unless this is some new comparator clock I haven't heard about. Which I'm pretty sure it isn't.
I am so mad at the Sky fanboys who are like "ADD BUUUDDDER TWO MINCRFT CUZ BURDR Z SP ASWUM ND STUFZ BUDDERBUDDERBUDDER Posted Image:D:D:D:D" that I am dedicating my signature to stopping them. I had gone into more depth, but the stupid signature limit stopped me. Oh well.

#6

melancholicricebowl
  • Minecraft: XXXILift305

Posted 02 October 2013 - 02:35 AM

Ah, that works too. Thanks!